internationalization

Design considerations for internationalization

跟風遠走 提交于 2019-12-17 21:24:47
问题 I've read Joel's article on Unicode and I feel that I have at least a basic grasp of internationalization from a character set perspective. In addition to reading this question, I've also done some of my own research on internationalization in regards to design considerations, but I can't help but suspect that there is a lot more out there that I just don't know or don't know to ask. Some of the things I've learned: Some languages read right-to-left instead of left-to-right. Calendar, dates,

Internationalization in a website

北战南征 提交于 2019-12-17 20:59:43
问题 I m using ResourceBundle method getBundle(Propertyfilename,Local.languagename) class which returns an object of ResourceBundle of the local rb = ResourceBundle.get Bundle("Locale Strings", Locale.ARABIC);-Not Supported How can i use this to support arabic,band english. 回答1: First, the java.util.Locale indeed doesn't have a Locale.ARABIC constant. But that shouldn't stop you from defining it yourself using the Locale constructor taking the language code: public static final Locale ARABIC = new

Working with Unicode strings in Delphi 7

不想你离开。 提交于 2019-12-17 19:43:00
问题 I need to write a program which will browse through strings of various lengths and select only those which are written using symbols from set defined by me (particularly Japanese letters). Strings will contain words written in different languages (German, French, Arabic, Russian, English etc). Obviously there is huge number of possible characters. I do not know which structure to use for that? I am using Delphi 7 right now. Can anybody suggest how to write such program? 回答1: Obviously you

Regular Expression for Japanese characters

回眸只為那壹抹淺笑 提交于 2019-12-17 18:47:07
问题 I am doing internationalization in Struts. I want to write Javascript validation for Japanese and English users. I know regular expression for English but not for Japanese users. Is it possible to write one regular expression for both the users which validate on the basis of Unicode? Please help me. 回答1: This thread may be old but just thought that I add my 2 cents. Here is a regular expression that can be used to match all English alphanumerics, Japanese katakana,hiragana,multibytes of

How do you structure i18n yaml files in Rails?

落花浮王杯 提交于 2019-12-17 17:25:15
问题 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, show, new, edit page html elements: # h1, title activerecord: attributes: model: property: Now I have the following things that I want to fit into this structure but I'm unsure how to: Navigation Button text (save changes, create account, etc) Error

Internationalization(Number formatting “num.toLocaleString()”) not working for chrome

走远了吗. 提交于 2019-12-17 17:07:25
问题 i want do number formatting in Javascript.. and i use the following method num.toLocaleString() which will work for Firefox, IE but doesnt work for Google Chrome.. Wat i need to add for it work in chrome browser. 回答1: The toLocaleString() method is by definition implementation-dependent: it uses the implementation locale, such as browser locale. So if I were looking at your page that uses the method, I would see numbers formatted according to Finnish or English locale, depending on which

Internationalization(Number formatting “num.toLocaleString()”) not working for chrome

孤街浪徒 提交于 2019-12-17 17:06:19
问题 i want do number formatting in Javascript.. and i use the following method num.toLocaleString() which will work for Firefox, IE but doesnt work for Google Chrome.. Wat i need to add for it work in chrome browser. 回答1: The toLocaleString() method is by definition implementation-dependent: it uses the implementation locale, such as browser locale. So if I were looking at your page that uses the method, I would see numbers formatted according to Finnish or English locale, depending on which

Handling Character Encoding in URI on Tomcat

我的未来我决定 提交于 2019-12-17 16:44:14
问题 On the web site I am trying to help with, user can type in an URL in the browser, like following Chinese characters, http://localhost:8080?a=测试 On server, we get GET /a=%E6%B5%8B%E8%AF%95 HTTP/1.1 As you can see, it's UTF-8 encoded, then URL encoded. We can handle this correctly by setting encoding to UTF-8 in Tomcat. However, sometimes we get Latin1 encoding on certain browsers, http://localhost:8080?a=ß turns into GET /a=%DF HTTP/1.1 Is there anyway to handle this correctly in Tomcat? Looks

Angular 2 i18n dynamic/instant translation

拟墨画扇 提交于 2019-12-17 16:39:40
问题 I've followed the angular.io cookbook for internationalization (https://angular.io/docs/ts/latest/cookbook/i18n.html#!#angular-i18n). Everything works fine, and if I change my locale in the index.html file: document.locale = 'en'; But I wish to change this dynamically, as we used to do in AngularJS. I have found several solutions, such as this: //mycomponent.component.ts changeLang(){ localStorage.setItem('localeId', "es"); location.reload(true); } //I hardcoded the locale, but you get the

Detect at runtime which country's App Store my iPhone app was downloaded from?

喜夏-厌秋 提交于 2019-12-17 15:58:08
问题 I have a feature in my iPhone application that, for business reasons, should only be shown/available to customers in the US. If I want to release this app to App Stores outside the US, what's the best way to figure out which country I'm in without relying on user-defined settings such as language and locale? In my mind, the ideal solution is that there's some runtime property that can tell me which App Store country the app was downloaded from, and I can take action accordingly. Looking