Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 858151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:30:16+00:00 2026-05-15T08:30:16+00:00

I’m wondering how to deal internationalization in JavaScript. I googled but I’m not getting

  • 0

I’m wondering how to deal internationalization in JavaScript. I googled but I’m not getting convincing answers for:

  • Does JavaScript have native support for internationalization?
  • What is i18n in JavaScript?
  • How to deal with calendars, currencies, dates, etc.?

I’ve already read Internationalization inside JavaScript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:30:17+00:00Added an answer on May 15, 2026 at 8:30 am

    Localization support in legacy browsers is poor. Originally, this was due to phrases in the ECMAScript language spec that look like this:

    Number.prototype.toLocaleString()
    Produces a string value that represents the value of the Number formatted according to the
    conventions of the host environment’s current locale. This function is implementation-dependent, and
    it is permissible, but not encouraged, for it to return the same thing as toString.

    Every localization method defined in the spec is defined as "implementation-dependent", which results in a lot of inconsistencies. In this instance, Chrome Opera and Safari would return the same thing as .toString(). Firefox and IE will return locale formatted strings, and IE even includes a thousand separator (perfect for currency strings). Chrome was recently updated to return a thousands-separated string, though with no fixed decimal.

    For modern environments, the ECMAScript Internationalization API spec, a new standard that complements the ECMAScript Language spec, provides much better support for string comparison, number formatting, and the date and time formatting; it also fixes the corresponding functions in the Language Spec. An introduction can be found here. Implementations are available in:

    • Chrome 24
    • Firefox 29
    • Internet Explorer 11
    • Opera 15

    There is also a compatibility implementation, Intl.js, which will provide the API in environments where it doesn’t already exist.

    Determining the user’s preferred language remains a problem since there’s no specification for obtaining the current language. Each browser implements a method to obtain a language string, but this could be based on the user’s operating system language or just the language of the browser:

    // navigator.userLanguage for IE, navigator.language for others
    var lang = navigator.language || navigator.userLanguage;
    

    A good workaround for this is to dump the Accept-Language header from the server to the client. If formatted as a JavaScript, it can be passed to the Internationalization API constructors, which will automatically pick the best (or first-supported) locale.

    In short, you have to put in a lot of the work yourself, or use a framework/library, because you cannot rely on the browser to do it for you.

    Various libraries and plugins for localization:

    • Mantained by an open community (no order):
    • Polyglot.js – AirBnb’s internationalization library
    • Intl.js – a compatibility implementation of the Internationalisation API
    • i18next (home) for i18n (incl. jquery plugin, translation ui,…)
    • moment.js (home) for dates
    • numbro.js (home) (was numeral.js (home)) for numbers and currency
    • l10n.js (home)
    • L10ns (home) tool for i18n workflow and complex string formatting
    • jQuery Localisation (plugin) (home)
    • YUI Internationalization support
    • jquery.i18Now for dates
    • browser-i18n with support to pluralization
    • counterpart is inspired by Ruby’s famous I18n gem
    • jQuery Globalize jQuery’s own i18n library
    • js-lingui – MessageFormat implementation for JS (ES2016) and React
    • Others:
    • jQuery Globalization (plugin)
    • requirejs-i18n Define an I18N Bundle with RequireJS.

    Feel free to add/edit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.