Cirilla app supports Flutters official supported number of 78 languages.
The following locales are supported:
bn– Bengali Bangla
ca– Catalan Valencian
de– German (plus one country variation)
el– Modern Greek
en– English (plus 8 country variations)
es– Spanish Castilian (plus 20 country variations)
fil– Filipino Pilipino
fr– French (plus one country variation)
gsw– Swiss German Alemannic Alsatian
km– Khmer Central Khmer
ky– Kirghiz Kyrgyz
nb– Norwegian Bokmål
nl– Dutch Flemish
pa– Panjabi Punjabi
ps– Pushto Pashto
pt– Portuguese (plus one country variation)
ro– Romanian Moldavian Moldovan
si– Sinhala Sinhalese
sr– Serbian (plus 2 scripts)
zh– Chinese (plus 2 country variations and 2 scripts)
Set default language
To set a default language for your app open app.dart file located in:
And change the language code to your own language as shown in below screenshots and you are all good to go:
Add language to App
We by default have English and Arabic language files are included in the app, more to be added. To add your language to the app follow below steps to add your own language to the app.
In this step we will show you how to add your own language to our Cirilla flutter app.
Go to your Cirilla folder and navigate to:
You will find en.json and ar.json now copy en.json file and rename it to your language locale code, for example for Italian it will be: it.json for French it will be: fr.json. Now translate your duplicated and renamed file to your own language.
Next step you need to navigate to app.dart file located in:
Open it and add your locale code as shown in below screenshot
If your website is multi-lingual and you want to make your app Multi-Lingual you will need to have WPML installed on your website so multi-lingual functionality can work.
Advanced locale definition
Some languages with multiple variants require more than just a language code to properly differentiate.
zh-hant is a language code return from your website, but in the list of languages support above it’s zh
So we need custom Locate like in this file to map zh-hant to Locale with language code zh
Then add file language zh.json and config languages support in file app.dart