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
38
votes
5 answers

How to load all dart DateFormat locale in flutter?

In Flutter app, intl package load only 15 languages. However Dart DateFormat support many more. I do not need translation, but need correct DateFormat. How to load all DateFormat locale?
Kyaw Tun
  • 12,447
  • 10
  • 56
  • 83
18
votes
1 answer

Organise .arb files in flutter using Flutter intl extension

Running Flutter Intl: Initialize generates lib/l10n/intl_en.arb. However due to many strings in my applications I would wish to have multiple arb files for same language. To make it more clear, consider the following folder structure -->lib -->…
Siva Jagadesh
  • 343
  • 2
  • 10
14
votes
4 answers

How to import intl library in Flutter?

I am new in Flutter. When I import the library: import 'package:intl/intl.dart'; , it says that the target of URI doesn't exist:package:intl/intl.dart;
TSR
  • 17,242
  • 27
  • 93
  • 197
9
votes
2 answers

Flutter Intl plugin used with dynamic Strings

I am using the Flutter Intl plugin by Localizely to localize my App. I generated arb files for the languages I want and begin to introduces the translations. For example: { "documentsSection": "All the documents", "favouritesSection":…
jRuMoL
  • 349
  • 1
  • 12
9
votes
3 answers

How to get the current locale text direction in Flutter using Intl

I'm creating a new flutter UI component that contains selection and getting more info about the product. I want this component to support RTL also, So I need to get the current locale language direction which will allow me to know which corners of…
7
votes
4 answers

flutter internationalization using dynamic string in json file

So far I was using dynamic strings as shown in the solution of this post: Flutter internationalization - Dynamic strings Here's an example: AppLocalizations.of(context).userAge(18) And on AppLocalizations.dart: userAge(age) => Intl.message( "My…
Simple UX Apps
  • 611
  • 2
  • 10
  • 20
6
votes
0 answers

How to add Localizations to a Flutter package without a MaterialApp?

I am moving some widgets of my app into a seperated Flutter package. These widgets use AppLocalization to display localized Strings. I want to define the Strings inside the package. In the package there is no 'entry point' in form of a…
Smofe
  • 71
  • 2
5
votes
1 answer

Flutter Intl - Use of double type in ARB plural translations

Been moving over to Flutter 2, and in process moving our translations directly into .arb format, as now suggested. However hitting an issue where the generated l10n translation files can't understand when a type should be double and instead uses…
Craig Rees
  • 53
  • 1
  • 7
5
votes
0 answers

How to switch the language by code in flutter-web

I am having problems switching the language in a flutter-web application. I added the required dependencies to the package.yml. dependencies: flutter: sdk: flutter intl: ^0.16.1 flutter_localizations: sdk:…
Mark
  • 7,507
  • 12
  • 52
  • 88
3
votes
1 answer

How to add Internationalization to a Flutter Plugin

I made a Flutter plugin and I need to add Internationalization. I have follow this tutorial like I usually do for a my Flutter app : Internationalization in Flutter 1.22+ But with a Flutter plugin there is no MaterialApp so I can't add this…
zackattack
  • 199
  • 3
  • 12
2
votes
2 answers

Flutter analyze finds issues in Gitlab CI/CD pipeline that it does not on local

I have recently started a new Flutter project. There is very little to it at this point. Only a couple of files and some basic packages like riverpod and intl for localization. Whenever I run flutter analyze on my local machine there are no problems…
GentleAutumnRain
  • 514
  • 1
  • 5
  • 16
2
votes
3 answers

how to use intl flutter without context?

I'm trying to use the intl plugin to get more translations of my app, but it always needs a context. In files without context where I simply have to assign a value to the variable what should I do? For example I would like to do something like…
Jonathan
  • 106
  • 1
  • 8
2
votes
1 answer

How to use intl DateFormat to convert string "1030" to "10:30am"

I am dealing with time strings such as "1030" or "0230" I am trying: var time = "1030"; DateFormat.jm().format(DateFormat("hhmm").parse(time)); However that throws the following error: Unhandled Exception: FormatException: Trying to read mm from…
user1354934
  • 8,139
  • 15
  • 50
  • 80
2
votes
1 answer

Issues with Flutter's MaterialLocalizations

I have issues with my Material Widgets (AppBar widget as an example). I tried to find a solution in other SO questions but nothing is working. In production App bar's back button, and some other material files aren't working too, even material…
erknvl
  • 98
  • 9
2
votes
3 answers

FLUTTER: Localization of a multi-screen app

i'm creating a multi screen app on android using Flutter. I'm using intl to localize it, but i don't understand how to procede to create the arb file. Should i run the following commaand flutter pub pub run intl_translation:extract_to_arb…
DCanalia
  • 21
  • 1
  • 2
1
2 3 4