In an effort to reach as much of the world's population as we can, I've tried to make localizing Yuebing as simple as possible
hokeylization ("hokey localization") uses Google Translate to create all the locale-specific resources for a new language, based on a default language
Yuebing has already been hokeylized from English into 21 other languages; these translations are undoubtedly flawed -- corrections are very welcome! Please send a pull request on GitHub, or if you're not comfortable doing that, open an issue
When you create a new GitHub issue about a translation, please do:
- include the page URL (copy/paste from browser address bar)
- include the exact text that is wrong (copy/paste from browser)
- kindly offer a suggestion of a better translation
- Thank you!
In the example below, we use a locale name qq
, which is not a valid 2-letter ISO language code.
The only languages that will work with hokeylization are the language codes recognized by Google Translate
In the example below, the default locale is en
, but you can set a different value for the default locale
by setting the YB_DEFAULT_LOCALE
env var. Or if you really want to hard-code things, edit nuxt.config.js
and
set the publicRuntimeConfig.defaultLocale
property.
To bootstrap a locale qq
:
- Edit
nuxt.config.json
, add the 2-letter language code (qq
in this example) to thepublicRuntimeConfig.locales
array - Edit
shared/messages/en_messages.json
, define a new keylocale_qq: 'QQish'
(others for example:locale_fr: 'French'
orlocale_ur: 'Urdu'
) - Run
yarn hokeylize
, this will:- Generate
shared/messages/qq_messages.json
with Google Translate versions of theen
file - Update all the other
shared/messages/*_messages.json
files (excepten
) with their translations forlocale_qq: 'QQish'
- Generate files in
serverMiddleware/templates/email/qq/...
for all the email templates
- Generate
Examine the files for errors and corrections!
To add support for a new locale without hokeylization, you will need to:
- Define email templates in
serverMiddleware/templates/email/
- Define a string table in
shared/messages/
The email templates determine the language-specific emails that get sent out, based on the user's locale
The string table determines what appears in the web UI, based on the user's local
In the examples below, we use a locale name qq
, which is not a valid 2-letter ISO code
You should use the appropriate code for your translation
Use one of the 2-letter abbreviations in the 639-1
column on this
list of ISO language codes
Create a directory in serverMiddleware/templates/email/qq/
Populate this directory with translations of every file from one of the other locale-specific template directories
Create a file named shared/messages/qq_messages.js
(copy another one of the locale files)
Provide translations for all of the string messages
Edit nuxt.config.js
and add your locale to the publicRuntimeConfig.locales
array
Commit your changes and submit a pull request on GitHub to help everyone else out!