Questions tagged [internationalization]

Internationalization(i18n : representing "internationalisation" as "i" followed by 18 more letters, followed by "n") is the process of planning and implementing products and services so that they can easily be adapted to specific local languages and cultures, a process called localization. The internationalization process is sometimes called translation or localization enablement.

This is a matter not only of changing the language which the software presents (e.g. in its user interface), but of changing the date format, the orientation of the text, the numeric format, and other aspects of its behavior to reflect the culture.

11657 questions
53
votes
4 answers

Convert non-ASCII chars from ASCII-8BIT to UTF-8

I'm pulling text from remote sites and trying to load it into a Ruby 1.9/Rails 3 app that uses utf-8 by default. Here is an example of some offending text: Cancer Res; 71(3); 1-11. ©2011 AACR.\n That Copyright code expanded looks like this: Cancer…
craic.com
  • 3,786
  • 5
  • 22
  • 17
53
votes
10 answers

How do I get localized date pattern string?

It is quite easy to format and parse Java Date (or Calendar) classes using instances of DateFormat. I could format the current date into a short localized date like this: DateFormat formatter = DateFormat.getDateInstance(DateFormat.SHORT,…
Paweł Dyda
  • 18,366
  • 7
  • 57
  • 79
53
votes
4 answers

How to cast datetime to datetimeoffset?

How can i convert an SQL Server datetime value to a datetimeoffset value? For example, an existing table contains datetime values that are all in "local" server time. SELECT TOP 5 ChangeDate FROM…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
52
votes
6 answers

Button to change the language Flutter

I am building an app in Flutter, so far I am using the Internationalization with JSON where the language of the app is based on the language that the user has as default in his phone its working pretty well, but I would like to give the user a…
Luthermilla Ecole
  • 666
  • 1
  • 6
  • 14
52
votes
3 answers

react-intl vs react-i18next for ReactJS internationalization (i18n)

I need to build a multilanguage application using ReactJS. The application needs a custom dictionary for different languages as well as automatic formatting of date/time, numbers and currency. From all I´ve seen there are 2 very popular…
Mendes
  • 17,489
  • 35
  • 150
  • 263
52
votes
2 answers

Database modeling for international and multilingual purposes

I need to create a large scale DB Model for a web application that will be multilingual. One doubt that I've every time I think on how to do it is how I can resolve having multiple translations for a field. A case example. The table for language…
udexter
  • 2,307
  • 10
  • 41
  • 58
52
votes
6 answers

How do you structure i18n yaml files in Rails?

I started populating an en yaml file in Rails and I can already tell it will get messy and out of hand before too long. Is there a convention to keeping this file organized? So far I have this structure: language: resource: pages: # index,…
Mohamad
  • 34,731
  • 32
  • 140
  • 219
51
votes
1 answer

Write # in yaml (in the string)

I'm new using yml files (for translations in my framework). I'm trying to add a "#" inside the translation (will be a twitter share... blabla). Is this possible, because the file translate it like a comment...
Alex Pereira
  • 916
  • 1
  • 9
  • 17
50
votes
17 answers

Why isn't everything we do in Unicode?

Given that Unicode has been around for 18 years, why are there still apps that don't have Unicode support? Even my experiences with some operating systems and Unicode have been painful to say the least. As Joel Spolsky pointed out in 2003, it's not…
baudtack
  • 29,062
  • 9
  • 53
  • 61
50
votes
3 answers

Passing variables inside rails internationalization yml file

I want to use variables declared in yml file right there. For example, I declared site_name and want to use it below in description. en: site_name: &site_name "Site Name" static_pages: company: description: *site_name #this works fine …
alex
  • 3,682
  • 3
  • 21
  • 22
49
votes
3 answers

Django: How to get language code in template?

Is there's some global variable for gettin' language code in django template or atleast passing it through view? something like: {{ LANG }} should produce "en" for example.. I really not comfortable when people using request.LANGUAGE_CODE. Detailed…
holms
  • 9,112
  • 14
  • 65
  • 95
49
votes
5 answers

Localization in JSF, how to remember selected locale per session instead of per request/view

faces-config.xml: ru ua In a bean action method, I'm changing the locale in the current…
sergionni
  • 13,290
  • 42
  • 132
  • 189
49
votes
4 answers

What is the difference between creating a locale for en-US and en_US?

I have all my ResourceBundle values in a table and formatted as per requirement. I have to change the languages on the website based on user selection in a dropdown at the top of the page. If I use a language code such as en_US, then it works fine.…
Jothi
  • 14,720
  • 22
  • 68
  • 93
49
votes
11 answers

Gettext: Is it a good idea for the message ID to be the english text?

We're getting ready to translate our PHP website into various languages, and the gettext support in PHP looks like the way to go. All the tutorials I see recommend using the english text as the message ID, i.e. gettext("Hi there!") But is that…
Sean
  • 1,668
  • 1
  • 18
  • 28
49
votes
5 answers

Storing and displaying unicode string (हिन्दी) using PHP and MySQL

I have to store hindi text in a MySQL database, fetch it using a PHP script and display it on a webpage. I did the following: I created a database and set its encoding to UTF-8 and also the collation to utf8_bin. I added a varchar field in the…
Anirudh Goel
  • 4,571
  • 19
  • 79
  • 109