internationalization

ISO 4217 - How Do I retrieve the numeric value(840) for the currency code “USD” in .NET?

只谈情不闲聊 提交于 2019-12-19 10:44:11
问题 For the currency code ISO 4217, how do I retrieve the numeric value from within the .NET framework? For example, the numeric value for the US Dollar is 840. ISO Code 4217 回答1: The ISO3166 currency codes (840 for U.S. Dollar, etc.) are not available in the .Net framework. All you can get from the RegionInfo class is the ISO4217 currency code ( ISOCurrencyCode ) (e.g. USD) and the CurrencySymbol (e.g. $). You will, I'm afraid, have to download a list of the data and do the mapping yourself. 回答2

heroku I18n locale is different from default_locale, works fine locally

与世无争的帅哥 提交于 2019-12-19 10:36:30
问题 So, everything works fine locally, but at heroku it changes to :en Fire up console on both environments: Heroku: heroku console --app myapp Local: rails c Then play around Heroku: > I18n.l Time.now => "Tue, 01 Mar 2011 06:43:58 -0800" Local: > I18n.l Time.now => "tirsdag, 1. mars 2011, 15:43" Heroku: > I18n.default_locale => :nb Local: > I18n.default_locale => :nb #after a lot more trial and error, I find this: Heroku: > I18n.locale => :en Local: > I18n.locale => :nb Just doing I18n.locale =

How to change the preferred language of an iPhone app in iOS 4

那年仲夏 提交于 2019-12-19 10:15:12
问题 Changing the language of an iPhone app has been discussed many times, but I'm stuck with this one: The provided solutions require the app to be restarted to make the changes take effect. But how do you achieve this on an iPhone 4? Pressing "home" sends the app to the background and clicking the app icon just brings it back. The user has experience as if the app had been restarted and wonders why the language hasn't changed. Thanks for your help. 回答1: You could write your own replacement for

Replacements for gettext

早过忘川 提交于 2019-12-19 08:04:58
问题 We use gettext for translations in our product, but have had a lot of problems with it: Can't use a language unless the system supports it. On Solaris 9 Sparc, if we reset the environment to various English locales, the message still won't be translated, if the machine doesn't have the corresponding locale. The translation file is present, but we can't access it. Uses environment to work out language This causes problems in servers that want to translate messages into different languages. In

What is a correct approach to using strong/em tags when localising strings?

坚强是说给别人听的谎言 提交于 2019-12-19 07:10:33
问题 I know some languages emphasise words differently to English, e.g. via changing word endings rather than stressing words with inflection of the voice. If you are localising a site, would you trust that <strong> and <em> tags (and their placement) will have the same meaning in other languages — would you maintain this emphasis, check with your translator or leave them out? What I'm wondering is how this translates (excuse the pun) into the semantics of the web? — Strong and em tags carry

Convert localizable.strings to spreadsheet?

筅森魡賤 提交于 2019-12-19 05:47:15
问题 Is there a standard way to convert the localizable.strings file to csv format, or something else than can be imported by a spreadsheet program such as OpenOffice? Thanks. 回答1: You can just import in your spreadsheet program and use the "=" character as delimiter between the two columns. Just make sure that your spreadsheet program preserves UTF-8 or UTF-16 characters when importing and exporting. 回答2: A bit outdated answer, but this online tool, does the job better and faster: http://localise

If you have the ISO country code `US`, `FR`, how do you get the Locale code (`Locale.US`, `Locale.FRANCE`)?

£可爱£侵袭症+ 提交于 2019-12-19 05:14:30
问题 If you have the country code US , FR (ISO-3166-1 alpha-2 country code), how do you get the Locale code ( Locale.US , Locale.FRANCE ) to do something like this: System.out.println(DecimalFormat.getCurrencyInstance(Locale.US).format(12.34)); System.out.println(DecimalFormat.getCurrencyInstance(Locale.FRANCE).format(12.34)); $12.34 12,34 € 回答1: You can't, because a Locale is used to hold a language, not a country. It can hold a language for a specific country, and for a specific variant in this

Japanese/Chinese text in pdf using iText Java

巧了我就是萌 提交于 2019-12-19 03:54:29
问题 I need to add japanese/chinese text from xml web response to pdf using iText in java. I tried the following code after copying the KozMinPro-Regular.ttf to my c:\WINDOWS\Fonts folder but failed. Font font = new Font(BaseFont.createFont("KozMinPro-Regular", "UniJIS-UCS2-H", BaseFont.EMBEDDED), 10); Can anyone help me? 回答1: You should use iTextAsian (extra JAR file). Some description of cmap_info.txt inside iTextAsian.jar . Note that whatever value you pass for the 'embedded' parameter with the

Internationalization in Hibernate validators

空扰寡人 提交于 2019-12-19 02:52:11
问题 Does Hibernate validators supports internationalization. I saw the jar and I could see the various ValidationMessages.properties file. Can we create our own custom error messages which will be internationalized? I don't want to use error messages provided by default in Hibernate validators. We need to use our own custom message and they should be internationalized. As well what are the languages supported by the Hibernate validators. In jar I saw properties files for the English, French,

i18n doesn't work at production environment on heroku

只谈情不闲聊 提交于 2019-12-19 02:29:08
问题 I have seen more than one hundred posts about i18n issues and no solution seems to solve my problem. I have an app running with Django 1.3.1 and it works Fine at my develop machine. But when I bring to heroku nothing happens. The files are not translated at all. It seems that the locale folder in my project is not being found. Locale folder is at my project level and this is my settings: BASE_PATH = os.path.dirname(os.path.abspath(__file__)) LANGUAGE_CODE = 'pt-br' USE_I18N = True USE_L10N =