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
1
vote
1 answer

Internationalisation in Flutter: how do you get all keys from one select?

Ok, maybe the question is not very precise. But, I figured out that the only way to have something similar to Android's for translation in Flutter is to use select. For instance, "pronoun": "{gender, select, male{he} female{she}…
Draško
  • 2,119
  • 4
  • 41
  • 73
1
vote
1 answer

old flutter project, flutter_localizations problem

I have a problem with running an older flutter project on my windows machine. flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.10.5, on Microsoft Windows [Version 10.0.22621.1848], locale…
Amr Hassan
  • 160
  • 8
1
vote
1 answer

Flutter/Dart: DateFormat (using intl): how to remove zero prefix?

I am using intl pakage's DateFormat class to format dates with a format like this: _standardDateFormat = DateFormat('MMM dd, yyyy'); This produces strings like Feb 01, 2023. How can I have the date without the prefix of 0 when it's a single-digit…
or9ob
  • 2,313
  • 4
  • 25
  • 45
1
vote
1 answer

flutter, dart : How convert formatted DateTime to its original form

_date = DateFormat('dd-MMM-yyyy').format(_rawDateTime); I have formatted the above _date with Intl package for displaying and now I have to send back to server and server require original format so how I can convert the above formatted date back…
Abdullah
  • 35
  • 1
  • 9
1
vote
2 answers

Access properties of a flutter class through the content of a variable

I'm in Flutter (Dart), I want to access to a property of a class, but the property that I have to access is defined by the content of another variable. Example: class class Fruit{ String get apple {return 'The apples are red';} String…
AlonsoFV
  • 13
  • 3
1
vote
0 answers

GlobalMaterialLocalizations.delegate Does not Support Chinese

It seems GlobalMaterialLocalizations.delegate does not support the zh Locale (Chinese). Is it really necessary adding GlobalCupertinoLocalizations.delegate before other locales works? I get this error each time I run the app without adding the…
1
vote
1 answer

Dart DateFormat inconsistency

I'm trying to parse date string that looks like this Feb0920221500 (month, day in month, year, hours, minutes). But when I use MMMddyyyyHmm pattern I always get a FormatException. Furthermore intl's DateFormat fails to parse back a date which it has…
KY1VSTAR
  • 395
  • 4
  • 16
1
vote
1 answer

flutter I want to convert NumberFormat form to double

Below is the code where the error occurs. I want to convert [NumberFormat][1] form to double. What should I do? I want to display it on the screen with the currency symbol, and get the result as a double . Sample source: import…
Patrick SINT
  • 454
  • 1
  • 4
  • 13
1
vote
1 answer

Flutter manually change Language with flutter_localizations and intl

I'm creating a PopupMenuButton to change the language of the app locally but I don't know how to load a different language. This is the Widget that I'm creating to change the language and I want to set the app language to the value of the PopupMenu…
JonasLevin
  • 1,592
  • 1
  • 20
  • 50
1
vote
1 answer

Language structure problem in localization for flutter?

I am using localization in flutter. this is the eng text: placed for $date this is the translated text: $date का लागि राखिएको as you can see the text has a variable (date) in it and as the grammar structure for the two language is different the…
Ragas
  • 3,005
  • 6
  • 25
  • 42
1
vote
1 answer

Which languages ​are supported by flutter internationalization

I know that flutter internationalization can support many languages, but I can’t find out which languages ​​it supports. Where can I find this information?
Zhuoyuan.Li
  • 318
  • 2
  • 10
1
vote
1 answer

Flutter: Get Wrong days of the week

from Monday - Thursday, I get the right days, but from Friday, I get the wrong days. Why? Code example: Text(DateFormat('EEEE').format(DateTime(DateTime.friday))), And i get Saturday. Is that a bug?
Tolga
  • 335
  • 2
  • 4
  • 17
0
votes
0 answers

Why Flutter intl plugin keeps generating wrong files even if proper template provided?

Followed the tutorial from Internationalizing Flutter apps only to discover that once Android Studio (Giraffe|2022.3.1 Patch1)'s Flutter Int plugin was initialized it will keep generating same file intl_en.arb inside the l10n folder even if the…
Alex
  • 5,510
  • 8
  • 35
  • 54
0
votes
2 answers

Flutter facing issue with passport MRZ 2 digit year code

am new to flutter, in my project am scanning passport MRZ line using google ml kit and parse the data. Am facing issue when user birthdate is 23-04-2000 , in this case MRZ will be 000423. and I trying to convert to dd-MM-yyyy format facing…
abhi
  • 54
  • 8
0
votes
0 answers

How to show different mesurement units according to the user locale in flutter/dart

I have to display a Value in both imperial and metric systems for example 1000 Liter could be displayed as 1000 Gallons or 1000 Gl for shorl if the user is in the USA. or 500 ml vs 500 Oz 100 Miles vs 100 Km I have the locale of the user. but as…
Shobi
  • 10,374
  • 6
  • 46
  • 82