Template Localization

Template Localization #

As elaborated in the preceding segment titled Email Templates, the Cosync JWT authentication system furnishes a variety of customizable templates for textual correspondence between the authentication server and the end user of the application. These templates encompass:

  • Email verification on signug using a 6-digit code
  • Email verification on signup using a link
  • The click through page for email verification using a link
  • The password reset email
  • The invite onboarding email
  • QR verification email for the Googe authenticator
  • SMS message set during phone 2FA login

Initially, all these templates are provided in English by default, which can serve adequately in the early stages of application development and potentially even during the product’s initial release. Nevertheless, if the application gains traction and success, the need for translation into other languages often arises. This translation process encompasses not only the product’s user interface screens (whether on iOS or Android) but also extends to encompass emails and SMS messages dispatched to users by the authentication system.

To facilitate template localization, the Cosync JWT authentication system introduced the concept of a locale, represented by a two-letter code that corresponds to a supported language. The list of locales supported by Cosync JWT is provided below. Each registered user operates within a designated locale, which is established during their application onboarding process, whether through signup or registration in response to an invitation. Importantly, users have the flexibility to modify this locale at a later point if needed.

An application established within the Cosync JWT authentication system has the capability to incorporate additional locales it wishes to accommodate, along with the ability to tailor the messaging within these locales. It’s important to note that an application user is restricted to choosing their locale from the subset of locales that the application supports. By default, the sole supported locale is EN, which represents English.

Setting up Locales #

Incorporating a new locale into an application is a straightforward process within the Cosync JWT authentication system. To initiate this, navigate to any template within the Email Templates tab of the application settings. From there, click on the option labeled EDIT LOCALE.


editlocale


This action will open a dialog box, enabling you to introduce a new locale for the application. To achieve this, simply click on the Add Locale button provided.


modifylocale


This action will prompt a menu to appear, offering you the option to choose the new locale you wish to add, such as FR (for French), for example.


addfrench


Upon selecting a new locale to incorporate, you will observe its addition to the roster of supported locales for your application. It’s worth noting that the default locale EN (English) remains unremovable.


frenchadded


When a new locale is introduced, like FR for French, the messaging content will initially remain in English. The responsibility falls upon the developer to undertake the translation of this messaging into the newly added locale. As an illustration, the translated text for the Password Reset template in French would read as follows:


translatedlocale


In the event that an application user has their locale set to FR (French), they would receive the French edition of the Password Reset email upon requesting a password change. As evidenced, the Cosync JWT authentication system streamlines the implementation of localization support.

Locale codes supported by Cosync JWT #

The Cosync JWT authentication system supports the ISO 631-1 codes that are described here ISO 639-1 codes

  • AB, Abkhazian
  • AA, Afar
  • AF, Afrikaans
  • AK, Akan
  • SQ, Albanian
  • AM, Amharic
  • AR, Arabic
  • AN, Aragonese
  • HY, Armenian
  • AS, Assamese
  • AV, Avaric
  • AE, Avestan
  • AY, Aymara
  • AZ, Azerbaijani
  • BM, Bambara
  • BA, Bashkir
  • EU, Basque
  • BE, Belarusian
  • BN, Bengali
  • BI, Bislama
  • BS, Bosnian
  • BR, Breton
  • BG, Bulgarian
  • MY, Burmese
  • CA, Catalan
  • CH, Chamorro
  • CE, Chechen
  • NY, Chichewa
  • ZH, Chinese
  • CU, Slavonic
  • CV, Chuvash
  • KW, Cornish
  • CO, Corsican
  • CR, Cree
  • HR, Croatian
  • CS, Czech
  • DA, Danish
  • DV, Divehi
  • NL, DutCH,
  • DZ, Dzongkha
  • EN, English
  • EO, Esperanto
  • ET, Estonian
  • EE, Ewe
  • FO, Faroese
  • FJ, Fijian
  • FI, Finnish
  • FR, French
  • FrisiAN, Western
  • FF, Fulah
  • GD, Gaelic
  • GL, Galician
  • LG, Ganda
  • KA, Georgian
  • DE, German
  • EL, Greek
  • KL, Kalaallisut
  • GN, Guarani
  • GU, Gujarati
  • HT, Haitian
  • HA, Hausa
  • HE, Hebrew
  • HZ, Herero
  • HI, Hindi
  • HO, Hiri
  • HU, Hungarian
  • IS, Icelandic
  • IO, Ido
  • IG, Igbo
  • ID, Indonesian
  • IA, Interlingua
  • IE, Interlingue
  • IU, Inuktitut
  • IK, Inupiaq
  • GA, Irish
  • IT, Italian
  • JA, Japanese
  • JV, Javanese
  • KN, Kannada
  • KR, Kanuri
  • KS, Kashmiri
  • KK, Kazakh
  • KM, Khmer
  • KI, Kikuyu
  • RW, Kinyarwanda
  • KY, Kirghiz
  • KV, Komi
  • KG, Kongo
  • KO, Korean
  • KJ, Kuanyama
  • KU, Kurdish
  • LO, Lao
  • LA, Latin
  • LV, Latvian
  • LI, Limburgan
  • LN, Lingala
  • LT, Lithuanian
  • LU, Luba
  • LB, Luxembourgish
  • MK, Macedonian
  • MG, Malagasy
  • MS, Malay
  • ML, Malayalam
  • MT, Maltese
  • GV, Manx
  • MI, Maori
  • MR, Marathi
  • MH, Marshallese
  • MN, Mongolian
  • NA, Nauru
  • NV, Navajo
  • ND, North-Ndebele
  • NR, South-Ndebele
  • NG, Ndonga
  • NE, Nepali
  • NO, Norwegian
  • NB, Bokmal-Norwegian
  • NN, Nynorsk-Norwegian
  • LI, Sichuan
  • OC, Occitan
  • OJ, Ojibwa
  • OR, Oriya
  • OM, Oromo
  • OS, Ossetian
  • PI, Pali
  • PS, Pashto
  • FA, Persian
  • PL, Polish
  • PT, Portuguese
  • PA, Punjabi
  • QU, Quechua
  • RO, Romanian
  • RM, Romansh
  • RN, Rundi
  • RU, Russian
  • SE, Sami-Northern
  • SM, Samoan
  • SG, Sango
  • SA, Sanskrit
  • SC, Sardinian
  • SR, Serbian
  • SN, Shona
  • SD, Sindhi
  • SI, Sinhala
  • SK, Slovak
  • SL, Slovenian
  • SO, Somali
  • ST, Sotho-Southern
  • EW, Spanish
  • SU, Sundanese
  • SW, Swahili
  • SS, Swati
  • SV, Swedish
  • TL, Tagalog
  • TY, Tahitian
  • TG, Tajik
  • TA, Tamil
  • TT, Tatar
  • TE, Telugu
  • TH, Thai
  • BO, Tibetan
  • TI, Tigrinya
  • TO, Tonga
  • TS, Tsonga
  • TN, Tswana
  • TR, Turkish
  • TK, Turkmen
  • TW, Twi
  • UG, Uighur
  • UK, Ukrainian
  • UR, Urdu
  • UZ, Uzbek
  • VE, Venda
  • VI, Vietnamese
  • VO, Volap√ľk
  • WA, Walloon
  • CY, Welsh
  • WO, Wolof
  • XH, Xhosa
  • YI, Yiddish
  • YO, Yoruba
  • ZA, Zhuang
  • ZU, Zulu