As you read this article in English, look at the end of each line of text. You can thank the
<space> character for cleanly separating words into unbreakable chunks that aren’t interrupted by newlines. English: words trump newlines.
Japanese does not use spaces (in general). Humans that read Japanese just have a ‘spidey sense’ of where words start and stop based on grammar and context.
For large blocks of text like the body of articles, it is common for “words” to be split at newlines. This is OK — characters are mono-spaced and paragraphs keep an aesthetically pleasing blockiness. Japanese: newlines trump words.
While “newlines trump words” looks nice in large blocks of text, it looks awkward on lonely one-line text like titles.
Without a space character or hyphen telling the browser where to delimit words, the default behavior is to just pop characters off one-by-one like PEZ candies in a PEZ dispenser.
For example, this text “Learn body parts”:
(gif may take a moment to load)
This is the English equivalent of what’s happening on resize:
Learn body part
sLearn body par
tsLearn body pa
Can we agree this is ugly and unreadable?
To prevent PEZ dispensing and force the behavior of “words trump newlines” on this Japanese title, you’ll want to wrap the desired chunks in
display: inline-block style.
This solution is fine quick fix for the ocassional eye-catching title, but requires knowledge of Japanese grammar to know where to put the
Fortunately there is a cool tool called Budou that automates this formatting. You don’t even have to know Japanese — it uses AI to semantically parse text into words and insert the spans for you (it works for Chinese and Korean too!).
This has been the first of what will probably be many articles on “things I overlooked when translating my website into Japanese”.