Localization
You can find localization files in the lang directory. Each file corresponds to a specific language and contains key-value pairs for translation. The keys are used in the application code, and the values are the translated strings.
For example, the en.json file might look like this:
To translate the application into Spanish, you have to create a file named es.json with the following content:
In addition to JSON files, there is also a directory for each language, which can contain additional files or folders for more complex translations. For example, you might have an en directory for English translations that includes multiple PHP files for different sections of the application. You have to create a new directory named es for Spanish translations with the same structure as the en directory and translate the files accordingly.
You can add as many languages as you need by creating additional JSON files in the lang directory. The application will automatically load the appropriate file based on the user's language preference. It follows ISO 15897 standard for language codes used in the filenames. You can find the list of supported languages and their codes below.
English Name | Native Name | Code |
|---|---|---|
Afrikaans | Afrikaans | af |
Amharic | አማርኛ | am |
Arabic | العربية | ar |
Mapudungun | Mapudungun | arn |
Moroccan Arabic | الدارجة المغربية | ary |
Assamese | অসমীয়া | as |
Azerbaijani | Azərbaycan | az |
Bashkir | Башҡорт | ba |
Belarusian | беларуская | be |
Bulgarian | български | bg |
Bengali | বাংলা | bn |
Tibetan | བོད་ཡིག | bo |
Breton | brezhoneg | br |
Bosnian | bosanski / босански | bs |
Catalan | català | ca |
Central Kurdish | کوردیی ناوەندی | ckb |
Corsican | Corsu | co |
Czech | čeština | cs |
Welsh | Cymraeg | cy |
Danish | dansk | da |
German | Deutsch | de |
Lower Sorbian | dolnoserbšćina | dsb |
Divehi | ދިވެހިބަސް | dv |
Greek | Ελληνικά | el |
English | English | en |
Spanish | español | es |
Estonian | eesti | et |
Basque | euskara | eu |
Persian | فارسى | fa |
Finnish | suomi | fi |
Filipino | Filipino | fil |
Faroese | føroyskt | fo |
French | français | fr |
Frisian | Frysk | fy |
Irish | Gaeilge | ga |
Scottish Gaelic | Gàidhlig | gd |
Gilbertese | Taetae ni Kiribati | gil |
Galician | galego | gl |
Swiss German | Schweizerdeutsch | gsw |
Gujarati | ગુજરાતી | gu |
Hausa | Hausa | ha |
Hebrew | עברית | he |
Hindi | हिंदी | hi |
Croatian | hrvatski | hr |
Upper Sorbian | hornjoserbšćina | hsb |
Hungarian | magyar | hu |
Armenian | Հայերեն | hy |
Indonesian | Bahasa Indonesia | id |
Igbo | Igbo | ig |
Yi | ꆈꌠꁱꂷ | ii |
Icelandic | íslenska | is |
Italian | italiano | it |
Inuktitut | ᐃᓄᒃᑎᑐᑦ | iu |
Japanese | 日本語 | ja |
Georgian | ქართული | ka |
Kazakh | Қазақша | kk |
Greenlandic | kalaallisut | kl |
Khmer | ខ្មែរ | km |
Kannada | ಕನ್ನಡ | kn |
Korean | 한국어 | ko |
Konkani | कोंकणी | kok |
Kurdish | کوردی | ku |
Kyrgyz | Кыргыз | ky |
Luxembourgish | Lëtzebuergesch | lb |
Lao | ລາວ | lo |
Lithuanian | lietuvių | lt |
Latvian | latviešu | lv |
Maori | Reo Māori | mi |
Macedonian | македонски јазик | mk |
Malayalam | മലയാളം | ml |
Mongolian | Монгол хэл / ᠮᠤᠨᠭᠭᠤᠯ ᠬᠡᠯᠡ | mn |
Mohawk | Kanien'kéha | moh |
Marathi | मराठी | mr |
Malay | Bahasa Malaysia | ms |
Maltese | Malti | mt |
Burmese | မြန်မာဘာသာ | my |
Nepali | नेपाली | ne |
Dutch | Nederlands | nl |
Norwegian | norsk | no |
Odia | ଓଡ଼ିଆ | or |
Punjabi | ਪੰਜਾਬੀ / پنجابی | pa |
Polish | polski | pl |
Portuguese | português | pt |
Quechua | runasimi | qu |
Romansh | Rumantsch | rm |
Romanian | română | ro |
Russian | русский | ru |
Kinyarwanda | Kinyarwanda | rw |
Sanskrit | संस्कृत | sa |
Serbian | srpski / српски | sr |
Sesotho | Sesotho | st |
Swedish | svenska | sv |
Tamil | தமிழ் | ta |
Telugu | తెలుగు | te |
Turkish | Türkçe | tr |
Ukrainian | українська | uk |
Urdu | اُردو | ur |
Uzbek | Uzbek / Ўзбек | uz |
Vietnamese | Tiếng Việt | vi |
Xhosa | isiXhosa | xh |
Yoruba | Yoruba | yo |
Chinese | 中文 | zh |
Zulu | isiZulu | zu |