Supported Languages
AppFlowy Editor currently supports the following locales:- English (
en) - Bengali (
bn_BN) - Catalan (
ca) - Czech (
cs_CZ) - Danish (
da) - German (
de_DE) - Spanish (
es_VE) - French (
fr_FR,fr_CA) - Hindi (
hi_IN) - Hungarian (
hu_HU) - Indonesian (
id_ID) - Italian (
it_IT) - Japanese (
ja_JP) - Malayalam (
ml_IN) - Dutch (
nl_NL) - Polish (
pl_PL) - Portuguese (
pt_BR,pt_PT) - Russian (
ru_RU) - Turkish (
tr_TR) - Chinese (
zh_CN,zh_TW)
Basic Setup
To enable localization in your Flutter app, add the localization delegates:Setting a Specific Locale
You can set a specific locale for your app:Dynamic Locale Switching
You can change the locale at runtime:Accessing Localized Strings
You can access localized strings using theAppFlowyEditorLocalizations class:
Available Localized Strings
Text Formatting
Block Types
Colors
Actions
Links
Adding a New Language
To contribute a new language translation:1. Install Flutter Intl Plugin
Install the Flutter Intl VSCode extension.2. Create Translation File
Create a new.arb file in lib/l10n/ directory:
3. Translate Strings
Edit the new.arb file and translate all strings:
4. Generate Localization Code
Save the file, and the Flutter Intl plugin will automatically generate the necessary Dart code.5. Verify the Translation
Test your translation by setting the locale:Modifying Existing Translations
- Locate the translation file in
lib/l10n/intl_<locale>.arb - Modify the desired strings
- Save the file (code will auto-generate)
- Rebuild your app to see changes
Testing Translations
You can test translations interactively:RTL (Right-to-Left) Support
AppFlowy Editor supports RTL languages:Best Practices
- Always use localized strings: Never hardcode UI strings
- Test with long strings: Some languages (German, French) have longer text
- Support text direction: Ensure your layout works with RTL languages
- Context matters: Some words translate differently based on context
- Date and number formatting: Use
intlpackage for proper formatting
Contributing Translations
To contribute translations to AppFlowy Editor:- Fork the repository
- Add or modify translation files in
lib/l10n/ - Test your changes
- Submit a pull request