Added a description about language files
This commit is contained in:
parent
f99d38782a
commit
0afc4672bd
@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
This is intended for anyone wishing to contribute translations to the project.
|
This is intended for anyone wishing to contribute translations to the project.
|
||||||
|
|
||||||
|
### Language Files
|
||||||
|
In order to support translations of text in the user interface all of the text has been moved into .lang files located in `amulet_map_editor/lang`.
|
||||||
|
The name of these lang files are RFC 1766 format language codes.
|
||||||
|
For example `en` for English, `en_US` for US English and `en_GB` for British English.
|
||||||
|
The lang files are formatted with one localised string per line with a `=` symbol separating the identifying key and the localised text.
|
||||||
|
The keys must only contain the characters a-z0-9_. and values can contain any character including the `=` symbol.
|
||||||
|
|
||||||
|
When loading the lang files, first the `en.lang` file is loaded to ensure that there is at least something for any given key.
|
||||||
|
If the language code contains an `_` symbol (for example `fr_CA`) then the lang file for the language section will be loaded next (`fr.lang`).
|
||||||
|
This allows languages that do not vary much between regions to share the same language file to minimise duplication.
|
||||||
|
Finally, if it exists, the region specific language file will be loaded which should only contain entries that vary between regions.
|
||||||
|
|
||||||
### Branch Naming
|
### Branch Naming
|
||||||
A branch must be created in order to contribute to the project.
|
A branch must be created in order to contribute to the project.
|
||||||
Unless you have permissions to create branches in Amulet-Team you will first need to [fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo).
|
Unless you have permissions to create branches in Amulet-Team you will first need to [fork the repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user