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
61
votes
7 answers

How to source() .R file saved using UTF-8 encoding?

The following, when copied and pasted directly into R works fine: > character_test <- function() print("R同时也被称为GNU S是一个强烈的功能性语言和环境,探索统计数据集,使许多从自定义数据图形显示...") > character_test() [1] "R同时也被称为GNU S是一个强烈的功能性语言和环境,探索统计数据集,使许多从自定义数据图形显示..." However, if I…
Tony Breyal
  • 5,338
  • 3
  • 29
  • 49
61
votes
10 answers

Rails: Internationalization of Javascript Strings?

So, we have an existing Rails 2.3.5 app that does not support Internationalization at all. Now, I'm well familiar with Rails I18n stuff, but we have a LOT of output strings inside /javascripts/. I'm not a huge fan of this approach, but unfortunately…
Matt Rogish
  • 24,435
  • 11
  • 76
  • 92
60
votes
6 answers

Matching accented characters with Javascript regexes

Here's a fun snippet I ran into today: /\ba/.test("a") --> true /\bà/.test("à") --> false However, /à/.test("à") --> true Firstly, wtf? Secondly, if I want to match an accented character at the start of a word, how can I do that? (I'd really like…
nickf
  • 537,072
  • 198
  • 649
  • 721
59
votes
1 answer

Rails i18n: How to know what is the current language?

I am aware of how i18n/l10n is usually done in Rails3, and I chose to have a single ERB file that calls t(...) for localization. But for a particular part I need something special: I need to display a string whose localization is coming from an…
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
59
votes
7 answers

CSS: text-transform not working properly for Turkish characters

The implementations of the major browsers seem to have problems with text-transform: uppercase with Turkish characters. As far as I know (I'm not Turkish.) there are four different i characters: ı i I İ where the last two are the uppercase…
Malax
  • 9,436
  • 9
  • 48
  • 64
59
votes
8 answers

Rails link to current page and passing parameters to it

I am adding I18N to my rails application by passing the locale using url params. My urls are looking like http://example.com/en/users and http://example.com/ar/users (for the english and arabic locales respectively). In my routes file, I have…
Faisal
  • 19,358
  • 4
  • 30
  • 33
57
votes
8 answers

How to specify your webpage's language so Google Chrome doesn't offer to translate it

I have a page that Google Chrome insists on thinking is in French. Here's a snapshot of it: http://yootles.com/outbox/overcleverchrome.html Note that I'm including a meta http-equiv tag to tell it that it's in fact in English:
dreeves
  • 26,430
  • 45
  • 154
  • 229
57
votes
8 answers

set language within a django view

background: The view is called when a payment service pings back a payment outcome behind the scenes - afterwhich I need to send an email in the right language to confirm payment and so on. I can get the language code back in the request from the…
Guy Bowden
  • 4,997
  • 5
  • 38
  • 58
56
votes
4 answers

Ruby 1.9: how can I properly upcase & downcase multibyte strings?

So matz made the decision to keep upcase and downcase limited to /[A-Z]/i in ruby 1.9.1. ActiveSupport::Multibyte has long had great i18n case jiggering in ruby 1.8.x via String#mb_chars. However, when tried under ruby 1.9.1, it doesn't seem to…
kch
  • 77,385
  • 46
  • 136
  • 148
55
votes
2 answers

_() or {% trans %} in Django templates?

In Django templates, you can use either {{ _("Hello World") }} or {% trans "Hello World" %} to mark strings to be translated. In docs, the “official” approach seems to be the {% trans %} tag, but the _() syntax is mentioned too once. How these…
55
votes
7 answers

What do I need to know about Unicode?

Being a application developer, do I need to know Unicode?
yesraaj
  • 46,370
  • 69
  • 194
  • 251
54
votes
8 answers

Labeling file upload button

How can I internationalize the button text of the file picker? For example, what this code presents to the user:
mkoryak
  • 57,086
  • 61
  • 201
  • 257
54
votes
13 answers

Why is Flutter not generating the internationalization files?

I'm trying to follow the internationalization documentation in https://flutter.dev/docs/development/accessibility-and-localization/internationalization#dart-tools and…
drekka
  • 20,957
  • 14
  • 79
  • 135
53
votes
7 answers

How to make i18n with Handlebars.js (mustache templates)?

I'm currently using Handlebars.js (associated with Backbone and jQuery) to make a web app almost totally client side rendered, and I'm having issues with the internationalisation of this app. How can I make this work? Are there any plugins?
mdcarter
  • 1,015
  • 4
  • 11
  • 20
53
votes
2 answers

How to translate model in Ruby class/module namespace?

I have a model Products::Car. How can I translate its attributes? I have already tried this: activerecord: models: products: car: "Автомобиль" attributes: products: car: owner: "Владелец" And this: activerecord: …
Alex
  • 2,309
  • 2
  • 16
  • 20