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
-1
votes
4 answers

Flutter Intl (0.18!): Changing language for weekday

I want to change the language for the weekdays in intl: to German. In my code, I do this: final weekdayFormatter = DateFormat('E'); final date = mostRecentWeekday(_currentDate, 1).add(Duration(days: i)); "<-- Function to get current monday" ... …
Fabian M
  • 154
  • 14
-1
votes
2 answers

LateInitializationError: Field 'day0' has not been initialized

import 'package:intl/intl.dart'; late String day0; late String dateMonth0; late String day1; late String dateMonth1; late String day2; late String dateMonth2; late String day3; late String dateMonth3; late String day4; late String…
Likhith M
  • 41
  • 2
  • 6
-1
votes
1 answer

Why is PHP intl v.1.1.0 returning "El Salvador" for "-SV"?

I was going through the documentation, checking iso 2 digit country codes but I can't wrap my head around this. Everyone in the documentation it says that the 2 digit country code for Sweden is SV, yet it gives "El Salvador" back, when using this…
Narc0t1CYM
  • 499
  • 6
  • 25
-1
votes
1 answer

How do I get a list of all languages in PHP

I use code that handles a response from a 3rd party API and that response contains some language codes. I'd seen that there seem to be standards defining official codes for languages and was wondering if there was any way to access these in PHP. I…
mickadoo
  • 3,337
  • 1
  • 25
  • 38
-1
votes
2 answers

Is there any method in flutter with INTL package to convert this date format in DD-MM-YYYY

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?
-1
votes
1 answer

You must enable the intl extension to use CakePHP on line 31

As Cakephp is successfully installed and its showing the main page. It's giving this error while running the cake command in the cmd, C:\xampp\htdocs\cakephpwork\bin>cake PHP Fatal error: You must enable the intl extension to use CakePHP. in…
-1
votes
1 answer

Fatal error: You must enable the intl extension to use CakePHP, but I can't access php.ini

I installed cakephp 3.x and made code out of it and it's working on my localhost.. But after I deploy my code to web hosting, i got error Fatal error: You must enable the intl extension to use CakePHP. in…
-1
votes
1 answer

Sf2 : Intl component, formatCurrency

I'm using in a twig extension the intl component to get the symbol of the currency. Pretty simple as it is well explained here. But what i would like to do is to format the price based on the currency / local. There is indeed a method formatCurrency…
Brieuc
  • 3,994
  • 9
  • 37
  • 70
-1
votes
1 answer

Get locale in php with a country code

How do we get a locale or all the locales associated to a country if i have the country code or time zone. One country can have several languages, thus many locales.
user2707590
  • 1,066
  • 1
  • 14
  • 28
-1
votes
1 answer

php create DateTime from timestamped returned by IntlDateFormatter

i'm trying to find a convenient way to convert localized date inputs to a standard dateTime object. Having english input, it's really easy but unfortunately DateTime doesn't support internationalization, so I guess I'll have to use…
kKre
  • 21
  • 4
-1
votes
1 answer

PHP Fatal error: Class Bundle\\Controller\\Symfony\\Component\\Intl\\Intl not found

What I Need i Need To convert country code to currency Symbol. like for USD => $. i Need to convert Currency code to currency symbol. Code controller use Symfony\Component\Intl\ResourceBundle\CurrencyBundle; class EventDetailController extends…
user2818060
  • 835
  • 5
  • 19
  • 41
-1
votes
1 answer

Fatal error: Class 'IntlDateFormatter' on Windows

I have a zf2 application running on my WAMP server. And i have PHPUnit 4.0.18 by Sebastian Bergmann running too. My problem is : echo $this->dateFormat( $MyVariable->getDateInvoice(), \IntlDateFormatter::LONG,…
Greco Jonathan
  • 2,517
  • 2
  • 29
  • 54
-2
votes
2 answers

How to translate urls in Gatsby.js with i18next

I try to make my gatsby page multilingual. I am using gatsby-plugin-react-i18next, i18next and react-i18next like in documentation. i18n adds language prefix but page url is still the same. How i can translate friendly url? i have:…
Cirocki
  • 1
  • 1
-2
votes
1 answer

Dart Intl DateFormat.parse -1 year difference, bug?

when I execute this line of code: DateTime dt = DateFormat("EEEE dd.MM.yyyy HH:MM").parse("Monday 01.12.2019 17:00"); print("dt.tostring: " + dt.toString()); //2018-12-01 17:00:00.000 The date is getting parsed from 2019 to 2018. Tried 2020 and…
Justin
  • 367
  • 2
  • 14
1 2 3
28
29