YAML language definitions (#292)
This commit is contained in:
parent
241a4125b0
commit
6756de4466
89 changed files with 689 additions and 522 deletions
|
|
@ -48,17 +48,15 @@ Make sure you have a signing key. If you don't have one, follow the [official ma
|
|||
## Adding a New Language
|
||||
To support a new language one needs to:
|
||||
|
||||
- Find a suitable dictionary and add it to the `assets/` folder. Two file formats are supported, [see below](#dictionary-formats).
|
||||
- Find a suitable dictionary and add it to the `assets/languages/dictionaries/` folder. Two file formats are supported, [see below](#dictionary-formats).
|
||||
- Do not forget to include the dictionary license (or readme) file in the `docs/` folder.
|
||||
- Create a new language class in `languages/definitions/` and define its properties.
|
||||
- Create a new `.yml` file in `assets/languages/definitions/` and define the language properties.
|
||||
- `locale` contains the language and the country codes (e.g. "en-US", "es-AR", "it-IT"). Refer to the list of [supported locales in Java](https://www.oracle.com/java/technologies/javase/jdk8-jre8-suported-locales.html#util-text).
|
||||
- `dictionaryFile` is the name of the dictionary in `assets/` folder.
|
||||
- `characterMap` contains the letters and punctuation marks associated with each key.
|
||||
- `dictionaryFile` is the name of the dictionary in `assets/languages/dictionaries/` folder.
|
||||
- `layout` contains the letters and punctuation marks associated with each key. For 0-key and 1-key using `[DEFAULT]`, will be fine for most languages. However, if the language has extra punctuation marks, like Spanish, you could complement the list: `[DEFAULT, ¡, ¿]`
|
||||
- `abcString` _(optional)_. A custom string to display in ABC mode. By default, the first three letters on 2-key are used (e.g. "ABC" or "АБВ"). Set this if the first letters of the alphabet are _not_ on 2-key, like in Hebrew, or if a different string makes more sense.
|
||||
- `hasUpperCase` _(optional)_ set to `false` when the language has no upper- and lowercase letters. For example: Arabic, Hebrew, East Asian languages, and so on. The default is `true`.
|
||||
- `hasUpperCase` _(optional)_ set to `no` when the language has no upper- and lowercase letters. For example: Arabic, Hebrew, East Asian languages, and so on. The default is `yes`.
|
||||
- `name` _(optional)_ is automatically generated and equals the native name of the language (e.g. "English", "Deutsch", "Українська"). However, sometimes, the automatically selected name may be ambiguous. For example, both Portuguese in Portugal and Brazil will default to "Português", so assigning "Português brasileiro" would make it clear it's the language used in Brazil.
|
||||
- Finally, add the new language to the list in `LanguageCollection.java`. You only need to add it in one place, in the constructor. Please, be nice and maintain the alphabetical order.
|
||||
|
||||
|
||||
### Dictionary Formats
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue