Changes to language file section of README.md
john_r365 committed
Dec 31, 2022 at 20:03 UTC
286269a9e8e2c7d4f10a672211ad6972df395770
1 file changed
+27
-3
README.md
+27
-3
@@ -83,6 +83,24 @@ For instructions on how to build for Android: please view file `howto-build-andr
83
84
Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull request with the changes.
85
86
+## Current list of language files:
87
+
88
+- English
89
+- Spanish
90
+- French
91
+- German
92
+- Italian
93
+- Portugese
94
+- Dutch
95
+- Polish
96
+- Croatian
97
+- Russian
98
+- Ukranian
99
+- Hindi
100
+- Japanese
101
+- Chinese
102
+- Korean
103
+
104
## Add a new language
105
106
1. Create a new `strings_XX.arb` file in `res/values/`, replacing XX with the language's [ISO 639-1 code](https://en.wikipedia.org/wiki/ISO_639-1).
@@ -91,9 +109,15 @@ Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull reque
109
110
`"welcome" : "Welcome to",` -> `"welcome" : "XXX",`
111
94
-3. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language.
112
+3. For strings where there is a variable, denoted by a $ symbol and braces, such as ${status}, the string in braces should not be translated. For example, when editing line 106:
113
+
114
+"time" : "${minutes}m ${seconds}s"
115
+
116
+The only parts to be translated, if needed, are the values m and s after the variables.
117
+
118
+4. Add the language to `lib/entities/language_service.dart` under both `supportedLocales` and `localeCountryCode`. Use the name of the language in the local language and in English in parentheses after for `supportedLocales`. Use the [ISO 3166-1 alpha-3 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for `localeCountryCode`. You must choose one country, so choose the country with the most native speakers of this language or is otherwise best associated with this language.
119
96
-4. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides.
120
+5. Add a relevant flag to `assets/images/flags/XXXX.png`, replacing XXXX with the 3 digit localeCountryCode. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides.
121
122
## Add a new fiat currency
123
@@ -103,4 +127,4 @@ Edit the applicable `strings_XX.arb` file in `res/values/` and open a pull reque
127
128
3. Add the raw mapping underneath in `lib/entities/fiat_currency.dart` following the same format as the others.
129
106
-4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides.
130
+4. Add a flag of the issuing country or organization to `assets/images/flags/XXXX.png`, replacing XXXX with the ISO 3166-1 alpha-3 code used above (eg: `usa.png`, `eur.png`). Do not add this if the flag with the same name already exists. The image must be 42x36 pizxels with a 3 pixels of transparent margin on all 4 sides.
\ No newline at end of file