Multilingual Guide
The TanaFlows theme supports a professional and minimalist multilingual feature. You do not need to modify complex system configuration files. Simply follow the instructions below to activate and publish multilingual articles.
1. How Multilingual Works in TanaFlows
The TanaFlows theme manages translation links intelligently to ensure the best experience for readers:
- Static Pages (Homepage, Blog, Categories): The language switcher is always visible, allowing users to freely switch between language versions.
- Content Pages (Posts, Pages):
- If a translation exists: The language switcher works normally, allowing readers to click and read the article in the other language.
- If not translated (No
#multilingualtag): The language switcher will be grayed out and locked (unclickable), displaying the text “Not translated” to prevent readers from clicking and encountering a blank page (404 error).
2. Configuration Steps in Ghost Admin
Go to Ghost Admin > Settings > Design > Custom Settings of the TanaFlows theme and enter the following information:
- Enable Multilingual: Toggle the switch to On.
- Languages: Enter the list of site languages in the format:
language_code|Display_Name, separated by commas.- Example:
vi|Tiếng Việt,en|English - Note: The first language in the list (in this case,
vi) will be the Default Language (its URL path will not contain a language prefix).
- Example:
- Root URL: Enter your main website domain.
- Example:
https://tanaflows.com(do not add a trailing slash/).
- Example:
3. Writing and Linking Multilingual Posts
To allow readers to switch between translations of a post, follow this workflow:
Publish the Post in the Default Language (e.g., Vietnamese)
- Set the post URL path (Slug). Example:
huong-dan-su-dung - Add the internal tag
#multilingualto the post.
- Set the post URL path (Slug). Example:
Publish the Post in the Second Language (e.g., English)
- The URL path (Slug) must match exactly with the default post in Step 1. Example:
huong-dan-su-dung - Add the internal tag
#multilingualto the post.
- The URL path (Slug) must match exactly with the default post in Step 1. Example:
Info
When both posts share the exact same slug and have the #multilingual tag, the system will automatically link them. A reader on the Vietnamese post who selects “English” will immediately be redirected to the English version, and vice versa.
4. Localizing Default Labels (Localization)
If you want to change the static text labels shown on the interface (e.g., translating “Not translated” or “Back to Home”):
- Open the locales/ directory inside your theme folder.
- Open the corresponding language file (e.g.,
vi.jsonfor Vietnamese,en.jsonfor English). - Find the key you want to edit and enter your preferred translation.
- Example in
vi.json:"Not translated": "Chưa có bản dịch","Back to Home": "Quay lại trang chủ"