Change App Language
Internationalization (Language)
Medigo supports multiple languages and RTL (Right-to-Left) languages for international deployment. This guide explains how to configure and manage language settings in your Medigo Flutter application.
Understanding Language with BLoC State Management
Translations are kept as a simple key-value dictionary map. To add custom translations, create a class and extend Translations.
-
Translation Structure: Translations are maintained as key-value pairs for easy management.
-
Using Translations: Just append .tr to the specified key and it will be translated, using the
current value of Get.locale
and Get.fallbackLocale.
-
Example Implementation:
-
Apply language in main.dart:
-
Set Language dart file structure:
└── Medigo │ ├── android │ ├── ios │ ├── lib │ └── common │ └── language │ ├── ar.dart // Arabic language file │ ├── en.dart // English language file │ ├── fr.dart // French language file
-
Set All Languages Path:
-
Update language by applying language(context, appFonts.darkThemes):
-
Output:
-
Apply language in main.dart:
Note:
Medigo supports RTL (Right-to-Left) languages like Arabic and Hebrew. When adding new languages, ensure proper RTL support is configured in your theme settings if needed.