← Back to all articles
Blog

EFV international edition after a year and a half: professional Chinese/English translation and language switching

A professional team spent half a month translating 500 entries and thousands of specialized terms between Chinese and English. With Simplified Chinese, Traditional Chinese and English freely switchable, Advanced Efv is now international.

This update adds a multilingual framework. Administration switches among English, Simplified Chinese and Traditional Chinese; set a default language during installation.

Updates

  • One: Added a multilingual framework. Users can add language packs or entries and call them directly from the frontend.
  • Two: Added administration language switching, currently English, Simplified Chinese and Traditional Chinese.
  • Three: Released the international EFV edition; its international website will follow.

Framework

Uses the popular nodejs framework i81n-node. The source root gains locales with packs cn.json for Simplified Chinese, en.json for English and tc.json for Traditional Chinese. Add entries and call them from the frontend, as explained below. To add a language, copy en.json, rename it to an abbreviation such as jp.json for Japanese, and translate the values after each colon into Japanese.

Language-pack tutorial

To make "Home" multilingual in frontend supercms:

  • One: Append ”Home”:”Home” to en.json. Home means the homepage in English.
  • Two: Append ”Home”:”首页” and ”Home”:”首頁” respectively to cn.json and tc.json for Simplified and Traditional Chinese.
  • Three: In views/supercms/cmslayout.jade, replace the original homepage text with #{__('Home')}.

Template replacement syntax:

#{__('')}

Replace the text in single quotes with the language-pack identifier, such as Home.