
Summary
Key points of this document
- We separate the language detection strategy for public areas and application areas.
- Translation key management is the biggest operational challenge.
- Fonts are a pitfall for Vietnamese support.
Overview
The LMS on flares.jp is provided in two languages: Japanese and Vietnamese. While there are many articles on English support, information on Southeast Asian languages is scarce. Therefore, we will document our design decisions for implementation using React + i18next and how we addressed challenges specific to the Japanese-Vietnamese combination as a practical example.
We separate the language detection strategy for public areas and application areas.
We use i18next + react-i18next as our libraries. The key configuration point is where to perform language detection. The four options are: URL path, subdomain, cookies/local storage, and browser's Accept-Language.
For the LMS area after login, we prioritize user settings stored in the DB. For public pages, we use an initial estimation from browser settings + manual switching. Including the language in the URL path is advantageous for SEO, but it's meaningless in authentication-required areas and only increases URL complexity.
Translation resources are managed in JSON files, and namespaces are divided by "feature unit" rather than "screen unit." If divided by screen unit, the same text will be duplicated across multiple files, becoming a breeding ground for missed corrections.
Translation key management is the biggest operational challenge.
80% of the technical difficulty in multilingual support lies not in implementation, but in the operation of translation resources.
Keys are named by meaning, not by the exact wording. Wording-based keys fail when the same wording has different translations depending on the context. For example, the Japanese word "確認" (kakunin) can be translated as "Xác nhận" or "Kiểm tra" in Vietnamese, depending on the context.
Untranslated content is detected mechanically via CI. We prepare a script that detects key differences between Japanese JSON and Vietnamese JSON, and if differences exist, the CI build fails. Relying on i18next's fallback function quietly accumulates untranslated content. We separate roles: "fallback is for accident prevention, CI is the official detection method."
Regarding translation quality, it boils down to not using machine translation as is. Our system involves AI pre-translation + review by Vietnamese native speakers. Since there are established translations for technical intern training and specified skilled worker program terms, preparing a glossary beforehand and having the AI refer to it from the pre-translation stage significantly reduces the review burden.
Fonts are a pitfall for Vietnamese support.
Vietnamese is Latin-based but frequently uses characters with diacritics. Here are two pitfalls.
First, insufficient font glyphs. Fonts chosen for Japanese may not fully cover Vietnamese composite characters, leading to "patchy display" where character weights and heights mix within a single word. The solution is explicit font stacking. Link the lang attribute of the html element with language switching, and use the CSS :lang() selector to switch font-family per language.
Second, line height. Vietnamese diacritics appear above and below characters, so a line-height optimized for Japanese might cause symbols to touch the previous line. We adjust this per language, with 1.5 for Japanese and 1.6-1.7 as a guideline for Vietnamese.
Asymmetry in character count breaks layouts.
Japanese "保存" (save) is "Lưu lại" in Vietnamese, and "受講履歴" (course history) is "Lịch sử học tập". As a rule of thumb, Vietnamese requires 1.5 to 2.5 times the width of Japanese. Designing screens only for Japanese will inevitably lead to layout breakage.
The solution is to establish rules at the design stage. Do not use fixed widths for button and tab label areas; instead, use min-width and padding. Determine the number of navigation items based on the width required for Vietnamese. Then, take Playwright screenshot tests in both languages and detect visual breakages with CI. Since humans don't carefully examine screens in languages they can't read, it's more reliable to have machines monitor for breakages on Vietnamese screens.
Prevent omissions with an implementation checklist.
We summarize the main checklist items for Japanese-Vietnamese bilingual support. A common oversight is to only localize the screen while emails remain in Japanese.
- Is the
langattribute of thehtmlelement linked to language switching? - Are font stack and
line-heightdefined per language using the:lang()selector? - Is translation JSON key difference detection integrated into CI?
- Are date, number, and currency formats handled per language using the Intl API?
- Do screenshot tests in both languages cover the main screens?
- Is a glossary maintained and integrated into the translation workflow?
- Are email notifications and PDFs (e.g., completion certificates) also subject to language switching?
Multilingual support is not a feature implementation but an ongoing operation.
When outsourcing translations, it is safer to provide a set of four items (key, Japanese text, context description, glossary) in a spreadsheet instead of JSON, and then convert it to JSON with a script after delivery.
If you're looking to add a third language, avoid string concatenation that depends on word order and fully utilize i18next's interpolation and placeholders. Implementations that "happen to work for Japanese and Vietnamese" will break with the addition of an SVO language. Only those who first build the operational mechanism can add languages without failure.


