Issue I can’t get the country code in Flutter. Everything is either us or en. It shows up as us or en even if I change the device’s region or language. I want to show the language and region registered
Continue readingTag: flutter-localizations
I can't get the country code in Flutter. Everything is either us or en
Issue I can’t get the country code in Flutter. Everything is either us or en. It shows up as us or en even if I change the device’s region or language. I want to show the language and region registered
Continue readingHow to access flutter localization without a context
Issue I am using flutter localization from their official documentation here, and I am using clean architecture in my project. I want to access the app localization class without a context so I can translate the error messages in the
Continue readingHow to fix ICU Lexing Error: Unexpected character in Flutter
Issue I am using flutter_localizations to localize my app. Since updating to Flutter 3.7 i am getting this error: ICU Syntax Error: Expected "identifier" but found "}". This =|(){}[] obviously This =|\(){}[] obviously is the text that i have in
Continue readingFlutter localization: Formatting issue in app_en.arb
Issue This is my app_en.arb file: { "app_title": "Results and standings", "results": "Results", "standings": "Standings", } However, when I run flutter gen-l10n, the console prompted the following error which I don’t understand why, because it appears nothing wrong with the
Continue readingHow can I fetch a specific language string from an arb file in Flutter, regardless of the OS language setting?
Issue I am currently using AppLocalizations in my Flutter app to get strings from an arb file based on the language set in the OS. For example, if the OS language is set to English, the app will also display
Continue readingPrevent Google Translate from translating a variable
Issue I see Google Translate, both the web interface and API translates a variable like ‘{userName}‘. Is there a way to preserve the variable as it is? Context: I have a Flutter project with localization support. The ARB file contains
Continue readingLocalization issue in Flutter – AppLocalizations not found`
Issue I have added localization into my flutter app following flutter tutorial and few guidelines on internet. However, it seems not working. I have done this in my main.dart import ‘firebase_options.dart’; import ‘package:flutter_gen/gen_l10n/app_localizations.dart’; void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(
Continue readingFlutter: ChangeNotifierProvider does not listen to Changes
Issue I am very new to flutter. I have added localization to my app and I made a Language Switcher. I am trying to provide the changes of the Language Switcher witch ChangeNotifierProvider. It works on all Strings except the
Continue readingLocalization delegate is messing with widget test flutter
Issue I have a custom LocalizationDelegate that deals with my app localizations : class LocalizationDelegate extends LocalizationsDelegate<Localization> { const LocalizationDelegate(); @override bool isSupported(Locale locale) => [‘en’, ‘fr’].contains(locale.languageCode); @override Future<Localization> load(Locale locale) async { String string = await rootBundle .loadString("assets/strings/${locale.languageCode}.json"); language
Continue reading