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.
Add unofficial language to the app
As Flutter officially supports 78 languages by default our app also supports all other languages that are not official if unofficial localization is available and can be added to the app as shown in below example:
In this example we will add Kurdish CKB which is not officially supported by Flutter, you can follow same steps to add support for your own language.
We will need to make changes in below files:
/cirilla/pubspec.yaml /cirilla/lib/main.dart /cirilla/lib/constants/app.dart
First open your pubspec.yaml and add your language and add support for locale:
flutter_ckb_localization: git: url: https://github.com/AppCheap/flutter_ckb_localization.git
Then we navigate to our main.dart file and add import localization and then add support for the localization
Now we scroll down inside main.dart file until we find:
Then we add our localization configs directly under above configuration
Last but not least, we add our language/locale code/name to app.dart so our app can read and recognize it. It should be like this example:
const List<String> languageSupport = ['ku', 'ar', 'en'];
NOTE!: App uses websites default language, so if your website default language is English then the app will automatically recognize it and use it. If your websites default language is for example Persian, then you need to add your locale code in app.dart for the app to work properly with your language.
If you are not sure what your language code is, you can mask your website and find it out by add below to your domain:
It will show up like this: