---
title: "Support vertical and CJK text · Agent Wranglers"
url: https://agentwranglers.se/playbook/localization/layout-and-scripts/writing-modes
id: LOC-10
level: Optional
updated: 2026-10-22
tokens: 610
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Support vertical and CJK text

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Layout and scripts](https://agentwranglers.se/playbook/localization/layout-and-scripts.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: LOC-10
- Level: Optional
- Chapter: [Layout and scripts](https://agentwranglers.se/playbook/localization/layout-and-scripts.md)
- Rule: Where Chinese, Japanese or Korean (CJK) text appears, support vertical writing and their line breaking with `writing-mode` and the right line-break rules.
- Check: Text in the CJK pages breaks between phrases, and vertical blocks read top to bottom, right to left.
- How: Use `writing-mode`, `line-break` and `word-break: auto-phrase` where the language needs them. `auto-phrase` works only for Japanese and Korean, and only in Chromium browsers. Others fall back to normal breaking. For Arabic and Hebrew, see [Support right-to-left text](https://agentwranglers.se/playbook/localization/layout-and-scripts/rtl-support.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### CSS example

```css
:lang(ja) { line-break: strict; word-break: auto-phrase; }
.vertical:lang(ja) { writing-mode: vertical-rl; }
```

## Sources

- [W3C CSS Writing Modes Level 4](https://www.w3.org/TR/css-writing-modes-4/)
- [CSS Text Level 4 (word-break auto-phrase)](https://www.w3.org/TR/css-text-4/#valdef-word-break-auto-phrase)

## Related rules

- LOC-9 [Support right-to-left text](https://agentwranglers.se/playbook/localization/layout-and-scripts/rtl-support.md) in Localization

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/localization/layout-and-scripts/writing-modes">Agent Wranglers localization playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Isolate inserted text from the text around it](https://agentwranglers.se/playbook/localization/layout-and-scripts/bidi-isolation.md)
- [Layout and scripts](https://agentwranglers.se/playbook/localization/layout-and-scripts.md)
