## Launch Checklist - [x] Adds Azerbaijani (`az`) as a supported UI language, following the same pattern as the existing Turkish (`tr`) locale. - [x] `src/locales/az/translation.json` — full translation, 202 keys (matches `tr`/`de` key set exactly). - [x] Registered `az` in `i18next.config.ts` (`locales` array) and `src/i18n.ts` (`supportedLanguages`), alphabetically ordered. - [x] Added `az` row to the `src/locales/README.md` contributors table. - [ ] Link to related issues. - [ ] Include before/after visuals or gifs if this PR includes visual changes. (N/A — translation-only change, no UI layout changes.) - [ ] Write tests for all new functionality. (N/A — no new functionality, translation strings only.) - [ ] Add an entry to `CHANGELOG.md` under the `## main` section. (Not done — the prior Turkish locale PR (#1886) did not add a CHANGELOG entry either, so following existing precedent.) Terminology used consistently throughout: Layer → Qat, Style → Üslub, Source → Mənbə, Zoom → Yaxınlaşma, Filter → Süzgəc.
2.5 KiB
Internationalization
The process of internationalization is pretty straight forward for Maputnik.
Add a new language
1. Edit configuration
In order to add a new translation you'll need to add it to the configuration files. Please put it in alphabetical order.
- Open /i18next-parser.config.ts and add the ISO Code of your language to the
localesarray. - Now, open /src/i18n.ts and add the ISO Code and localized name to the supported languages.
2. Add the localized strings
Refresh the localization to generate a new directory under /src/locales/ for your new language.
npm install
npm run i18n:refresh
Replace every __STRING_NOT_TRANSLATED__ value in the newly generated translation.json file with the according translation.
Make sure all the keys are translated.
3. Test your new locale
Finally, test your language locally by starting a local instance of Maputnik.
npm run start
Consider adding your name as a helping person for the translation of new features.
Add localization for a new feature
If you happen to add a feature which needs some text to be translated, update the translation files. After running, check your working copy for files and add/correct as needed.
npm run i18n:refresh
The following users can help you with the relevant languages:
| ISO Code | Language | User |
|---|---|---|
| az | Azerbaijani | @jamalkamaladdin |
| de | German | @josxha |
| en | English | @HarelM |
| fr | French | @lhapaipai |
| he | Hebrew | @HarelM |
| it | Italian | @napo |
| ja | Japanese | @keichan34 |
| ko | Korean | @jinifor |
| zh | Simplified Chinese | @jieme |
| tr | Turkish | @mcihad |
You can test the UI in different languages using the dropdown in the top menu Note that Maputnik automatically localize based on browser language settings and stores this language in local storage. You can use incognito mode to check a first time usage.