Questions tagged [flutter-intl]

Flutter Intl Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues.

The most important library is intl. It defines the Intl class, with the default locale and methods for accessing most of the internationalization mechanisms. This library also defines the DateFormat, NumberFormat, and BidiFormatter classes.

Package Source

Package Link (pub.dev)

Repository (GitHub)

51 questions
0
votes
0 answers

ICU Message Format and Interaction / Links

In my application I use the ICU message format to localize user-visible strings for different languages. A relevant (contrived) example would be: (EN) Click on this link to find out more. (DE) Dieser Link führt zu weiteren Informationen. The issue I…
elfeck
  • 385
  • 1
  • 8
0
votes
0 answers

No instance of Strings was loaded. Try to initialize the Strings delegate before accessing Strings.current

I am writing test for ViewModel. In that process I don't have access to BuildContext. When I use as Strings.current.SOME_KEY in that scenario I got an error. Here is my code: void main() { late MyViewModel viewModel; setUpAll(() {}); …
Code Hunter
  • 10,075
  • 23
  • 72
  • 102
0
votes
0 answers

Use existing key in other translate Localizely

In localizely I have few translate key with their values. I want to set new key with ICU Select where I want to use existing translations. How can I use existing key in other translation? I have ICU Select key like that: {section, select,…
Captivity
  • 279
  • 5
  • 21
0
votes
1 answer

Check if flutter-intl translation exists and use it

I use flutter-intl to translate my app. I use protocol-buffers to communicate with other users. In the protocol buffer is an enum, e.g. blue, red, yellow. Now I want to translate the value of the enum and fallback to the enum variant name, if the…
Alai
  • 123
  • 1
  • 8
0
votes
0 answers

Flutter Intl - multi module translations with synthetic-package enabled

I have app that has 3 modules - Admin/Guest/Common I'd like to have arb translations in every module separately. I managed to do this with some help from answers here, but if admin is my main module, and I'm importing common in pubspec like…
miszmaniac
  • 825
  • 2
  • 10
  • 21
0
votes
1 answer

Flutter Intl plugin – how to set location of l10n directory that is generated?

I'm trying to use the flutter_intl plugin for Android Studio with an add-to-app Flutter app I'm developing on Android (by which I mean the Flutter app exists within an Android app, in its own sub-directory, and the Android Studio project includes…
0
votes
1 answer

initalize static string member in dart with a localized value using flutter_intl localization lib

I'm new to flutter and collecting fragments of code from here and there. I have a class that holds some data that will be passed later to a widget and generate the UI based on the passed data class OnBoardingViewModel with ChangeNotifier { final…
Basheer AL-MOMANI
  • 14,473
  • 9
  • 96
  • 92
0
votes
1 answer

Switching locale

I followed the guide on localization and it is working great. But I would like the user to be able to change to a locale in the app that is different from the local of the device. Can I somehow just set the locale for the app and have the entire app…
Neigaard
  • 3,726
  • 9
  • 49
  • 85
0
votes
2 answers

Flutter - change locale and persisting with Provider

I am really out of options here. I am currently trying to have an option in my settings that enable the user to change language on a Button tap with Provider. Changing the language currently works just fine, but it is not persisted, because I am…
0
votes
1 answer

Flutter, couldn't convert string to Date time format

I got data input in TextField using showDatePicker. I converted the selected data to String and parsed it to the format dd-mm-yy using intl format. According to docs DateFormat('ymd') is the way to do that. But I get the error FormatException:…
0
votes
1 answer

Resource IDs in arb files must Start with capital ?(flutter localization: i18n and l10n support)

I have a flutter project, and updated it to nullsafety just now. And I found that intl_translation plugin are not support for nullsafety. So I remove it and want to use the intl comes with the framwork of flutter. According to the official…
CheverJohn
  • 55
  • 1
  • 10
0
votes
0 answers

Flutter Intl - the getter was called on null

I am attempting to internationalize a flutter application using the Android Studio/VS Code Flutter Intl plugin. I can get the S.of(context).value to work throughout the app in widgets I've made myself and basic Text widgets but when I use it in…
KatieK
  • 83
  • 2
  • 7
0
votes
1 answer

How to change the main localization file in Flutter intl

Initially, the main localization file is intl_en.arb How and where to change the main localization file to another one, for example intl_ru.arb
fasmof
  • 17
  • 3
0
votes
2 answers

Flutter dependencies problems after upgrade

My code was working without problem. After upgrading flutter, pug get is giving error: But when I set intl to intl 0.17.0 , I got another error How can I solve this. Is it possible to go back in the old version of flutter? Thanks
0
votes
1 answer

Flutter i18n: How do I override device locale's regional formatting with app's user preferred regional formatting?

I have read through the flutter i18n docs. I would like to achieve what Windows or Mac does - we can select a region, say India and have the regional settings like start of week etc set. The user can override the Indian regional settings by setting…
Srikanth
  • 2,014
  • 19
  • 22