You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 21, 2025. It is now read-only.
-`SIGNING_KEY` <- the data from `<my-release-key.keystore>`
119
119
3. Change the `versionCode` and `versionName` on `app/build.gradle`
120
120
4. Commit and push.
121
+
122
+
## Translating
123
+
124
+
### Adding new languages or keys
125
+
126
+
1. In `src/i18n/` locate your desired language folder or create one if one does not exist
127
+
- When creating a new language dir ensure it follows the ISO 639 2-letter standard
128
+
129
+
2. In this folder create a file called `translations.ts`, this is where the translation keys for your desired language will be located
130
+
131
+
3. Populate your translation file with a translation object where all of the keys will be located
132
+
133
+
If you want to add Persian/Farsi you will create a file `/src/i18n/fa/translations.ts` and poulate it with keys like so:
134
+
```
135
+
/src/i18n/fa/translations.ts
136
+
137
+
export default {
138
+
Common: {
139
+
continue: "ادامه"
140
+
}...
141
+
}
142
+
```
143
+
(You should compare your translations against the English language as all other languages are not the master and are likely deprecated)
144
+
145
+
4. Add your new translation file to the `/src/i18n/config.ts` so you can begin to see them in the app
146
+
147
+
```
148
+
import fa from "~/i18n/fa/translations.ts"
149
+
150
+
export const resources: {
151
+
...
152
+
fa: {
153
+
translations: fa
154
+
}
155
+
}
156
+
```
157
+
158
+
5. Add your language to the `Language` object in `/src/utils/languages.ts`. This will allow you to select the language via the language selector in the UI. If your desired language is set as your primary language in your browser it will be selectedd automatically
159
+
```
160
+
export const LANGUAGE_OPTIONS: Language[] = [
161
+
{
162
+
value: "فارسی",
163
+
shortName: "fa"
164
+
},
165
+
```
166
+
167
+
6. That's it! You should now be able to see your translation keys populating the app in your desired language. When youre ready go ahead and open a PR to have you language merged for others!
168
+
169
+
### Testing language keys
170
+
171
+
To check what keys are missing from your desired language:
0 commit comments