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
33
votes
3 answers

How to translate active record model validations

When I submit a form with an error in it, it returns an error message. How can I translate these error messages with i18n? I already have translation for all the other texts in my views, so I know how l18n works in Rails. I now get this: 2 errors…
John
  • 6,404
  • 14
  • 54
  • 106
33
votes
6 answers

Using locale settings to detect wheter to use imperial units

I'm working on an app that wants to display lengths either in centimeters (cm) or in inches("). Is there a way to select the right unit from the locale? In any event I'm also going to put in an option so that the user can to override the locale…
vidstige
  • 12,492
  • 9
  • 66
  • 110
33
votes
5 answers

HTML tags in i18next translation files in React

I'm using i18next in a project and can't get around including html tags in translation files and having them properly rendered. An example of my .json translation file: "en": { "product": { "header": "Welcome, User!" …
Petr Gazarov
  • 3,602
  • 2
  • 20
  • 37
33
votes
3 answers

.NET Get timezone offset by timezone name

In database I store all date/times in UTC. I know user's timezone name ("US Eastern Standard Time" for example). In order to display correct time I was thinking that I need to add user's timezone offset to UTC date/time. But how would I get…
Daniil Harik
  • 4,619
  • 10
  • 55
  • 60
33
votes
10 answers

i18n - best practices for internationalization - XLIFF, gettext, INI, ...?

EDIT: I would really like to see some general discussion about the formats, their pros and cons! EDIT2: The 'bounty didn't really help to create the needed discussion, there are a few interesting answers but the comprehensive coverage of the topic…
markus
  • 40,136
  • 23
  • 97
  • 142
33
votes
6 answers

.NET: Are there any differences between InvariantCulture and en-US?

Given the following two cultures: CultureInfo c1 = InvariantCulture; CultureInfo c2 = new CultureInfo("en-US"); and i were to examine every piece of information specific to both cultures,…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
33
votes
2 answers

Xcode Base internationalization doesn't work

I'm trying to localize my app. I noticed that if I add a language every localized file become doubled. In this way it's impossible to maintain code or storyboard so I learnt that I need Base internationalization. The problem is that when I select…
Sparviero
  • 664
  • 1
  • 7
  • 14
33
votes
14 answers

Django templates: Get current URL in another language

I'm using i18n_patterns to create language prefixes in a Django app. My URLs look like this: /de/contact/ /fr/contact/ /it/contact/ In my base template, I'm looping over all available languages to show the language switch links. {%…
Danilo Bargen
  • 18,626
  • 15
  • 91
  • 127
32
votes
3 answers

Thai line breaking: how to break Thai text effectively

Situation with Thai text on a client site is that we can't control where exactly particular words/sentences are going to break between the lines (how web browser will handle it). Often, content appearance is indicated as incorrect by local…
joooc
  • 583
  • 2
  • 5
  • 9
32
votes
6 answers

How do I change the Development language in Xcode before internationalizing my app?

I'm taking over an app that was written entirely in French. Strings are hardcoded in French in the code, and all the messages in the storyboard are in French. But the initial development region in Info.plist was left to English. So I changed…
Sebastien
  • 3,583
  • 4
  • 43
  • 82
32
votes
2 answers

The best/recommended way to translate Django database values

I'm trying to figure out the best way to translate actual database values (textual strings, not date formats or anything complicated) when internationalizing my Django application. The most logical ways I could come up with were to either: hold a…
sa125
  • 28,121
  • 38
  • 111
  • 153
32
votes
3 answers

django fuzzy string translation not showing up

Why sometimes I get a fuzzy item in django.po language file. Actually, I have checked in my project the fuzzy string item is totally unique. #: .\users\views.py:81 .\users\views.py:101 #, fuzzy msgid "username or email" msgstr "9988" It is ok to…
icn
  • 17,126
  • 39
  • 105
  • 141
32
votes
2 answers

Best practice for key values in translation files

In general, translation methods take a key > value mapping and use the key to transform that into a value. Now I recognize two different methods to name your translation keys and within my team we do not come to consensus what seems to be the best…
Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99
32
votes
2 answers

Which Locale should I specify when I call String#toLowerCase?

In Java the String#toLowerCase method uses the default system Locale to determine how to handle lowercasing. If I am lowercasing some ASCII text and want to be sure that this is processed as expected which Locale should I use? EDIT: I'm mainly…
mchr
  • 6,161
  • 6
  • 52
  • 74
31
votes
3 answers

Internationalisation Django (on OSX)

I'm trying to get gettext to work in Django on my OSX Leopard django_manage.py makemessages -l nl Importing Django settings module settings processing language nl Error: errors happened while running xgettext on __init__.py /bin/sh: xgettext:…
Cluesane
  • 311
  • 1
  • 3
  • 3