Creating a Language
Learn how to Create a New Language
The Donation Store webstore is built to support any language, as long as there is a translation file available. The language files can be found in the languages folder of the application. Each language file has a name based on the languages locale and has the extension .lang. If you plan on creating a new language, please stick to this format.
The English translation is the core translation file that is maintained by the developer. If any new translations arise they are added here first. This isn't to say that the other files don't stay updated. It is advised that you choose a language file that you are comfortable translating from, to create your translation. For example, if you are more comfortable translating to French into your language, use that.
- Copy an existing language file, for example
- Paste this copied file (or save the contents of the file), to a new file with the locale of the language you are writing the translation for. More on locales here
- Translate the words on the right hand side of the file. The names on the left that are in English and separated by underscores are the keys that Donation Store uses to display each translation. Do not edit these or the language file will not work.
Maintain Valid JSON Syntax
While the language file has a .lang extension, the entire language file is just a JSON object. It is treated so by Donation Store. To ensure that the language file works and you don't run into problems. Maintain valid JSON syntax and use a JSON Linter/Syntax Checker to make sure it's okay.