PrimeLMS Doc
Product LinkInstallation PlansSupport
  • Introduction
  • Changelogs
  • Getting Started
  • 🚀Admin Setup
    • 1. Flutter Installation
    • 2. Code Setup
    • 3. Firebase Setup
      • 3.1 Firestore Database Setup
      • 3.2 Database Security Rules
      • 3.3 Database Index Setup
      • 3.4 Push Notification Setup
      • 3.5 Firebase Storage Setup
    • 4. App Configs
    • 5. Upload to Firebase Hosting
    • 6. Admin Credentials Steup
    • 7. Conclusion
  • 📱App Setup
    • 1. Introduction
    • 2. Code Setup
    • 3. Firebase Setup for Android
      • 3.1 Android Package Name Setup on Firebase
      • 3.2 Change Package Name Android
      • 3.3 Generate Debug Certificate
      • 3.4 Generate Release Certificate
      • 3.5 Google Sign In Setup for Android
      • 3.6 Facebook Login Setup for Android
      • 3.7 Additional Firebase Setup for Android
    • 4. Firebase Setup for iOS
      • 4.1 iOS Package Name Setup on Firebase
      • 4.2 Change Package Name iOS
      • 4.3 Facebook Login Setup for iOS
      • 4.4 Apple Login Setup
      • 4.5 Additional Firebase Setup for iOS
    • 5. Push Notification Setup
      • 5.1 Android Notification Setup
      • 5.2 iOS Notification Setup
    • 6. Multi-Language Setup
    • 7. Ads Setup
      • 7.1 Admob Setup for Android
      • 7.2 Admob Setup for iOS
    • 8. App Information Setup
      • 8.1 Change App Name
      • 8.2 Change App Icons & Images
    • 14. Run The App
    • 15. Releasing the Android App
    • 16. Releasing the iOS App
  • ⚒️In-App Purchase Setup
    • 17. Subscriptions Setup
      • 17.1 Android Setup
      • 17.2 iOS Setup
      • 17.3 Code Setup for Subscriptions
  • ⚒️Customization
    • 18. Enable/Disable Specific Features
Powered by GitBook
On this page
  • 6.1 Editing An Existing Language
  • 6.2 Adding A New Language
  • 6.3 Removing An Existing Language
  • 6.4 Start Locale Setup
  • 6.5 Disable Multi-Language Feature
  1. App Setup

6. Multi-Language Setup

Previous5.2 iOS Notification SetupNext7. Ads Setup

Last updated 1 year ago

You can skip this setup for now. This is not a mandatory setup to run this app.

So, we have used 10 languages in this app. English, Spanish, Hindi, Arabic, Portuguese, French, Chinese, German, and Indonesian.

You can add as many languages as you want. The multi-language feature is only for all of the static texts in the app. It's static and not related to the database.

English is the default and starting Language. You can change the default language too if you want.

6.1 Editing An Existing Language

If your language is already available on the list and you want to make some changes, then follow the steps below:

Example: If you want to change some text in the Spanish language, then open the assets/translations/es-ES.json file and edit only right-side values.

Don't edit the keys (Left side values)

If you find any characters in the right-side values like this below, don't remove them.

{}

6.2 Adding A New Language

If you want to add a new language that is not available in the default list, follow the steps below:

  • First, go to the assets/translations folder from your IDE. Add a .json file here with <language_code>-<country_code>.json name. Now go to the assets/translations/en-US.json file and copy everything from this file and paste it to your newly created .json file.

  • Now, Rename the all right-side strings. Look at the es-ES.json file and you will understand what to do.

Don't edit the keys (Left side values)

If you find any characters in the right-side values like this below, don't remove them.

{}

  • Now go to lib/config/language_config.dart the file and add your language code to the language list.

Your code should look like this:

"<Language_Name>": [<'Language_Code'>, <'COUNTRY_CODE'> ]
  • For Android, you don’t have to do anything.

  • For iOS, go to ios/Runner/Info.plist and add your language code in a string. Look at the picture below.

  • Add <string>your_language_code</string> inside the array. That's it.


6.3 Removing An Existing Language

To remove any language that is available in the list, please follow the steps below:

  • Go to the asset/translations folder and delete the your_language_code.json file that you want. (You shouldn't delete the en-US.json file because this is the default language).

  • Now go to lib/config/language_config.dart file and remove the list item that you want to remove from the langauges list.

  • And finally go to ios/Runner/Info.plist and remove the string. That’s it. (Only for iOS)


6.4 Start Locale Setup

English is added as the start language of the app by default. If you want to add any other language as a Start Language then go to the lib/language_config.dart file and replace the startLocale value with your locale value.


6.5 Disable Multi-Language Feature

You can disable the multi-language feature if you want. For this case, English will be used as the default and only language in the app. If you do that, the changing language option will be hidden from the app and the app will run with the default language.

To disable it go to the lib/configs/features_config.dart file and set the isMultilanguageEnbled value to false.

📱