Cirilla app is a multipurpose Flutter app for WordPress and WooCommerce that allows you to create different types of apps with rich functions and top code quality. One of the features of Cirilla app is that you can customize the language of your app by creating and editing a JSON file for your desired language.
Manual translate
The default language file of Cirilla app is en.json
, which is located in the folder assets/lang
of your Cirilla app project. It contains all the text strings that are used in the app, such as labels, buttons, messages, etc. Each string has a key and a value, for example:
{
"home": "Home",
"cart": "Cart",
"profile": "Profile",
"settings": "Settings"
}
The key is the identifier of the string, and the value is the actual text that will be displayed in the app. To translate the app to another language, you need to create a new JSON file with the same keys but different values according to your desired language. For example, if you want to translate the app to Spanish, you can create a file named es.json
and change the values like this:
{
"home": "Inicio",
"cart": "Carrito",
"profile": "Perfil",
"settings": "Ajustes"
}
You can use any text editor to create and edit the JSON file, but make sure to save it in UTF-8 encoding and follow the JSON syntax rules. You can also use online tools like JSON Editor Online to validate and format your file.
After you create the new JSON file, you need to copy it to the folder assets/lang
of your Cirilla app project. Then, you need to edit the file lib/
and add your new language code to the list of supported languages. For example, if you added Spanish, you need to change this line:constants
/app.dart
const List<String> languageSupport = ['en', 'ar', 'vi'];
to this:
const List<String> languageSupport = ['en', 'ar', 'vi', 'es'];
Finally, you need to rebuild your app.
Cloud translate
You can also use the cloud translation service provided by Appcheap to automatically translate your app language. To do this, you need to follow these steps:
- Go to https://admin.appcheap.io/ and log in with your Envato account.
- Go to Tools => Languages.
- Click on the button Create/Update/Download Languages.
- Select your desired language from the dropdown menu and click on Create/Update Language.
- A page will show with two columns: left side is Origin language, right side is Overwrite. If you want to update the translation, you can put the text in the input on the right side. You can also click on the dropdown menu to see more than 100 languages available for translation. Finally, click on Download Language to download the JSON file for your selected language.
- Copy the downloaded JSON file to the folder
assets/lang
of your Cirilla app project. - Edit the file
lib/
constants
/app.dart
const List<String> languageSupport = ['en', 'ar', 'vi'];
to this:
const List<String> languageSupport = ['en', 'ar', 'vi', 'es'];
Finally, you need to rebuild your app.