Questions tagged [intl]

Intl is a PHP extension which give ability to use Unicode, software internationalization (I18N) and globalization (G11N) from the ICU library.

Intl is the short description for Internationalization.

It's a PHP extension which create a wrapper for the library.

There are several modules available:

More information can be found on the PHP.net documentation.

434 questions
0
votes
0 answers

Fallback handling using React Intl

i18n .use(Backend) .use(I18nextBrowserLanguageDetector) .use(initReactI18next) // passes i18n down to react-i18next .init({ fallbackLng: 'en', debug: true, interpolation: { escapeValue: false // react already safes from…
0
votes
3 answers

Revert datetime format, from short to long

Tried searching around couldn't really find anything. Was hoping to find a way to revert the datetime format. So I start off with: 4-11-22 and I want to change to Friday, 12 November 2022. Using the intl package
rambo
  • 19
  • 1
  • 6
0
votes
1 answer

How can I solve Class "IntlDateFormatter" not found error on php

I am trying to use IntlDateFormatter class to format the local time but it is giving error as PHP Fatal error: Uncaught Error: Class "IntlDateFormatter" not found. I tried to solve it by uncommenting the extension=intl in php.ini. So it did not…
0
votes
1 answer

Intl.DateTime formatter get invalid time every time even after rerendering component. React

We have a component that receives information from the backend and has to render it, its properties are as follows: interface CitizenshipProps { citizenship?: Citizenship; name?: string; lastName?: string; onUpdateClick?: () =>…
SalahAdDin
  • 2,023
  • 25
  • 51
0
votes
1 answer

Is there a way to get the country code according to their calling number

I was trying to get a country's 2 letter code using the calling code. For example it would be getting the Country Code 'MY' from its calling code '+60' I want to use it to set the initialcountryvalue for intlphonefield. Is there a way to do that in…
凯文Beno
  • 55
  • 6
0
votes
1 answer

How can I change the language of the intl date formater?

So I want to change the intl Date format into a french format (fr_FR). I googled and I found this line but I don't know where to put it in the code: import 'package:intl/date_symbol_data_local.dart'; initializeDateFormatting('fr_FR', null).then((_)…
Mikelenjilo
  • 171
  • 1
  • 12
0
votes
1 answer

Get localized country name from country name

In php, how to convert the English country name to a localized version? For example, if the locale is set to fr, so that JAPAN would become JAPON. Update: managed to make it work from the country code but still need country to country code without…
8ctopus
  • 2,617
  • 2
  • 18
  • 25
0
votes
0 answers

Differences in formatting using Intl.DateTimeFormat when including the script name

Wonder if anyone knows why when using Intl.DateTimeFormat to create a formatter using 'en-GB' as the locale will give a different output to using 'en-Latn-GB' but using 'zh-HK' and 'zh-Hant-HK' will give the same result. See example below and…
blackmamba
  • 757
  • 5
  • 21
0
votes
1 answer

Unable to refresh text in child pages using flutter_localizations,intl

I'm trying to change localized words through my whole app. But it only changes when I restart my App or when I do subscription on lang changes. Is there any native way to change localized word without any subscription and have the same result as I…
0
votes
1 answer

Moment.js pluralisation of hours

Is it possible to make a plural form of hour and hours through momentjs? Or maybe something native from Intl. I looking for something like this, because I need localization as well. moment.specialFunction({hours: 1}); // 1…
Nikita
  • 317
  • 3
  • 10
0
votes
2 answers

Add Intl.Locale polyfill only when needed (How to block script tag with async functions)

I am trying to add Intl polyfill to an ember app, but have run into the issue that I need to add a script tag that executes async functions before evaluating other script tags. In ember I can add a new