53 questions
0
votes
1
answer
34
views
Flutter Intl Phone Field ignoring list from api
So im trying to populate custom values into flutter intl phone field
IntlPhoneField(
readOnly: config.isReadonly,
focusNode: focusNode,
initialCountryCode: '...
2
votes
3
answers
622
views
How to escape single quote in flutter's .arb files?
I have the following in my intl_en.arb file:
"title_chef_selection": "Chef's Selection",
"@title_chef_selection": {},
And I get this error: Error: Unbalanced escape ...
7
votes
3
answers
2k
views
How to get rid of metadata warnings in VS Code?
I installed the VS Code Flutter intl extension and use it to translate a Flutter app. After setting up the extension, my "Problems" pane in VS Code is full of warnings, one for each key and ...
1
vote
0
answers
1k
views
Why is Flutter not generating localization files?
Whenever I try to run the following commands:
flutter pub run intl_utils:generate
flutter gen-l10n
flutter gen-l10n --template-arb-file=intl_en.arb
It is not able to generate the localization files, ...
1
vote
1
answer
187
views
Remote, dynamic localization in flutter apps
I'm building flutter desktop application and need to implement localization/internationalization. I'm keeping the translations in the sql db and fetching via webapi. When the string is edited/changed ...
0
votes
1
answer
810
views
Flutter Intl plugin – I am failing to set the location of l10n directory that is generated
Hey I am building a flutter app and I am using the android studio flutter intl plugin, I want the generated files to be in src/shared/core/ but every time I generate them the go in the lib/ directory.
...
1
vote
1
answer
1k
views
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 ...
2
votes
2
answers
487
views
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 <string-array> for translation in Flutter is to use select. For instance,
&...
1
vote
1
answer
1k
views
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 ...
0
votes
2
answers
1k
views
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 ...
3
votes
0
answers
261
views
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 ...
2
votes
3
answers
2k
views
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 ...
1
vote
1
answer
107
views
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 ...
1
vote
1
answer
404
views
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 ...
0
votes
3
answers
5k
views
Why flutter give an error 'Undefined name DateFormat"?
How can I fix it? Please don't say import intl.dart as you can see at the second photo I already add it.
2
votes
3
answers
1k
views
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?
...
1
vote
1
answer
1k
views
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 ...
0
votes
1
answer
3k
views
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-...
0
votes
1
answer
529
views
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 ...
0
votes
1
answer
1k
views
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 ...
0
votes
2
answers
2k
views
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 ...
0
votes
1
answer
2k
views
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 ...
1
vote
2
answers
3k
views
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 ...
2
votes
1
answer
494
views
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 ...
2
votes
1
answer
640
views
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 ...
1
vote
1
answer
1k
views
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 ...
1
vote
1
answer
862
views
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 ...
0
votes
1
answer
3k
views
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 ...
5
votes
1
answer
6k
views
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 ...
0
votes
0
answers
116
views
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 ...
1
vote
1
answer
8k
views
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 ...
8
votes
0
answers
905
views
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 ...
0
votes
1
answer
727
views
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
0
votes
2
answers
166
views
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 ...
1
vote
1
answer
814
views
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 ...
0
votes
1
answer
298
views
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 ...
-1
votes
2
answers
918
views
Is there any method in flutter with INTL package to convert this date format in DD-MM-YYYY [duplicate]
I am developing a flutter news app. The format of date from Api response is ( 2021-02-05T09:41:13+0000 ) and I want to convert it to DD-MM-YYYY format. Can anybody help me with this?
0
votes
1
answer
2k
views
not able to solve number format in currency?
i have tried NumberFormat "#,##0.##"
i have tried NumberFormat "#,##0.00"
i have tried NumberFormat "#,##0.#0"
the format i want is (123,4567.89)
import 'package:flutter/...
22
votes
2
answers
5k
views
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, ...
1
vote
1
answer
386
views
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?
2
votes
1
answer
2k
views
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 ...
1
vote
1
answer
210
views
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?
4
votes
1
answer
1k
views
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 ...
0
votes
1
answer
350
views
How can I give string to translate?
I am using key - value translation-S.of(context).translation_key- but I need something like "Translation string".translate() or translate("Translation string")
How can I do this ?
...
2
votes
3
answers
1k
views
how to use localized strings in flutter's main app
I am new to Flutter and I am building a localized app using the flutter-intl plugin.
I've declared a "Title" string in the .arb file for my locales.
My program is trying to use this string ...
9
votes
2
answers
3k
views
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": "...
7
votes
4
answers
11k
views
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 ...
5
votes
0
answers
588
views
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
...
12
votes
3
answers
10k
views
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 ...
0
votes
1
answer
2k
views
Flutter: intl, time
I'm trying to convert the date time using the intl package, but the hour that it gives me back is always 8, while here is 10 (I live in Germany). Here's the code:
String test(){
var now = new ...