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
2
votes
0 answers

JavaScript: Sort a string that contains letters and numbers in a case-sensitive manner using Intl.Collator

With the requirement that I need to use the Intl.Collator (English language only) to sort strings that contains both letters and numbers (anywhere in the string). I need to have them sorted such that: Capital letters come before lower-case letters…
Russ
  • 623
  • 8
  • 14
2
votes
2 answers

Can i use internationalisation api to format sentence to have "and" word before last item?

I am trying to create a string with where i want to have the following there should be and word before the last word in the sentence if there is just one word then no and. for and array ['john','harry', 'darren'] i expect below e.g john harry and…
hafiz ali
  • 1,378
  • 1
  • 13
  • 33
2
votes
1 answer

Because project depends on flutter_localizations any from sdk which depends on intl 0.16.1, intl 0.16.1 is required

Okay so i have built an app nearly a year and half ago for my company, my boss recently wanted me to add a new screen to it and i did using all old and deprecated code of firebase and everything else (i really really dont wanna update them because i…
azheen
  • 897
  • 4
  • 15
  • 30
2
votes
2 answers

Is it possible to translate words "day", "week", "month", "year" with pure js in modern browsers (Intl API)?

Task is to display subscription price like 5$ / month in different locales. I can manage price part with Intl nicely, but stuck with time period translating part. I can use my own translation strings, but would prefer to use default Intl version if…
2
votes
0 answers

How can I define a custom style to an ARB text?

I have the following ARB file with the json: "textToTranslate": "Text to translate with a {parameter} inside", "@textToTranslate": { "description": "A parameter", "placeholders": { "parameter": { "type": "String" …
Scarkov
  • 21
  • 3
2
votes
1 answer

How to ensure Int.NumberFormat does not show currency code when using the same country?

Given a locale fr-CA, displaying a currency value in CAD, how can I have the country code not show? Because en-CA displays "$1.00" and fr-CA displays "1.00 $ CAD" for no apparent reason. See snippet below : [ 'fr-CA', 'en-CA', …
Yanick Rochon
  • 51,409
  • 25
  • 133
  • 214
2
votes
1 answer

Separating a sentence word by word with JavaScript (client)

I'm trying to separate a sentence word by word but it seems like it is a very hard task with JavaScript. I can't simply separate the sentence by looking at the whitespace. Because there are languages (Thai, Chinese, Japanese, etc.) that don't use…
batatop
  • 979
  • 2
  • 14
  • 31
2
votes
1 answer

How to get rid of intl deprecation message with symfony 5

Since I updated my project from symfony 4.4 to 5.0, I have on all my pages the following deprecation warning (only warning I'm having) : Please install the "intl" PHP extension for best performance. After searching for a solution, I thought that I…
2
votes
2 answers

Trying to install intl extension macOS Catalina and PHP 7.4.10

I am trying to install the zip and the intl extension for PHP 7.4.10 I run sudo pecl install intl and then the installation is requesting : Specify where ICU libraries and headers can be found [DEFAULT] : then I hit enter and continues but then…
JPRLCol
  • 749
  • 11
  • 28
2
votes
1 answer

Intl.NumberFormat is not working properly in IE11?

I am using Intl library of native Javascript to show formatted number in English and Chinese. It is working properly in Chrome, but it is not working in IE11. For English locale following is the code and output: new Intl.NumberFormat('en-GB', {…
2
votes
2 answers

React Intl with relativeTime formatting

I'm working on a kind of dynamic timestamp for messages using Intl. I want the timestamps to be dynamic in the way that it automatically transitions from ".. seconds ago" to "... minutes ago" to "... hours ago" to "today", after which it'll just…
2
votes
1 answer

'UnicodeString' was not declared in this scope

I can't compile php-intl (php - 5.5.9, ubuntu - 14.04, icu - 67) when I try pecl install intl, the following error appears In file included from /tmp/pear/temp/intl/intl_convertcpp.cpp:21:0: /tmp/pear/temp/intl/intl_convertcpp.h:28:25: error:…
Ewgeny
  • 21
  • 1
2
votes
3 answers

codeigniter 4, installation with composer problem

I'm new to Codeigniter and i want to ask why when i want to install CI 4 with composer it resulted Problem 1 - codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system. -…
2
votes
1 answer

intl extension installed but cant see in phpinfo()

I am using centos 7 with lamp +webmin control panel php 7.2,I need intl intl extension,I followed few tutorials from google and intl extension is installed(I am sure because if I try to install again it says already installed latest updated )see…
2
votes
1 answer

JavaScript sorting: Collator - Fix for aa (å)

I'm trying to make a sorting system. The problem I am facing is that the 'aa' comes last because in Danish 'aa' means 'å' and that is why it is last. If it is possible I want the 'aa' to be first and not last in the list. So to simplify, this is the…