-
-
Notifications
You must be signed in to change notification settings - Fork 228
Translation
If your language is still not included, download then english file as a starting point.
Rename the file by changing the "en" part with your language's 2-letter code. E.g.: hfs-lang-de.json
for German, hfs-lang-pt-br.json
for Brazilian Portuguese.
Now you can translate in your language each line after the "translate" line, but just the parts after the :
.
The file is a text file with JSON syntax, and each sentence syntax is ICU. When you see curly braces like {n}
,
that's a variable, like a number, always changing. Commands within curly braces MUST NOT be translated,
like plural
. Also one
and other
are commands, don't translate them!
The way plural works in your language is probably different from english, so if you don't get the results you need, you may need to make some changes. Refer to this guide to know your options.
Always check your file is working good on your computer before submitting.
If you see bad characters, verify your file is saved as UTF8.
When you are sure it's good, you can publish it. The easiest way is to open an issue
and attach your file (you may need to zip it, first, or rename it to .txt
because github is not allowing .json
).
We will include it in our folder.
Follow this thread to keep updated about new strings.
Use chatGPT or anything similar, and enter: translate to vietnamese
(or whatever is your language) and then past the whole json.
You will get a better starting point, save a lot of time, avoid confusion with the {n} syntax.
If you cannot access chatGPT or a similar tool, ask on the forum and we'll do it for you. Just specify the target language.
If you need to make some changes to the existing translation, your options are options are
- option A: make your own translation
- download the current translation,
- modify the entries you want,
- upload it on Admin-panel > Language > Add
- option B:
- you add some javascript to modify the language, by (making a plugin or) adding a tag to Admin-panel > Custom HTML > Section "After header"
<script> // "it" in the next line is for "italian", you need to change it to your language code HFS._.merge(HFS.lang, { it: { translate: { Username: "Ciao", Password: "Bye", } } }) </script>
- you add some javascript to modify the language, by (making a plugin or) adding a tag to Admin-panel > Custom HTML > Section "After header"