internationalization

ResourceBundle in Google App Engine Servlet does not work as expected

£可爱£侵袭症+ 提交于 2019-12-10 23:49:21
问题 Can someone help me to understand why internationalization using ResourceBundle does not work in Google App Engine Servlet the same way it works in a command line Java application? The following snippet: ResourceBundle resource_en_US, resource_de_DE, resource_ja_JP; resource_en_US = ResourceBundle.getBundle(bundleBasename, Locale.US); resource_de_DE = ResourceBundle.getBundle(bundleBasename, new Locale("de_DE")); resource_ja_JP = ResourceBundle.getBundle(bundleBasename, new Locale("ja_JP"));

What does 'Language neutral' mean with regard to MAKELANGID?

我与影子孤独终老i 提交于 2019-12-10 23:28:28
问题 The docs for MAKELANGID specify that MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) Means 'Language neutral'. This seems to be English on my machine (tried it with FormatMessage ), but what does it mean in general? Is it guarenteed to be English? Thanks! 回答1: I would expect that this means that the strings associated with the lang id are not specific to any language - which could be useful to know for a localisation team. "%1 + %2 = %3" would be an example of one such string. 回答2: with sublanguage

Main.strings couldn't be opened because there is no such file

ぃ、小莉子 提交于 2019-12-10 22:04:05
问题 What the project path for the Main.strings ? I renamed the project and so i18n don't works. I can't build the my application. This Main.strings is generated automatically? 回答1: Use identity and type for the selected file in Xcode, and set the file's location there. 来源: https://stackoverflow.com/questions/29906445/main-strings-couldnt-be-opened-because-there-is-no-such-file

Struts2: UTF .properties

为君一笑 提交于 2019-12-10 21:19:18
问题 Is there a way to load a UTF-8 encoded .properties file in Struts2? I know that its posible to load a UTF-8 file in a ResourceBundle via implementing your Control that loads a UTF8 inputstream but how to use it in Struts2? (I found howto do it in JSF here: http://jdevelopment.nl/internationalization-jsf-utf8-encoded-properties-files/ but cannot figure how to do it in struts2) PD: Also I know that I can use the native2ascii tool, but its... ugly... EDIT: I've seen that I can implement

Dealing with foreign characters in django query

旧巷老猫 提交于 2019-12-10 21:18:15
问题 I am building a search of city names imported from GeoNames.com. Some of the cities have international characters in the name. For example, "Istanbul" is actually "İstanbul" in the database. When people search for "Istanbul", İstanbul doesn't come up. Is there a way I can add a filter or decoder to the search that would know that İstanbul = Istanbul Currently, it's: cities = City.objects.filter(name__icontains=query) 回答1: Unidecode will help you solve a certain form of this problem. Unidecode

Correct timezone list when using Moment or Internationalization API

假如想象 提交于 2019-12-10 20:59:04
问题 When I use MomentJS or Internationalization API, I get obsolete timezones like Asia/Katmandu or Asia/Calcutta in Chrome! These should instead be outputted as Asia/Kathmandu and Asia/Kolkata . How do I fix this? 回答1: Your question is a little bit misguided, as there's aren't generally such things in the tzdb as "obsoleted" time zones. In general , once the tzdb has introduced an identifier, it will continue to support it indefinitely - either as a Zone or as a Link . The only exception is

internationalisation in android

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 20:26:41
问题 I am making an app in which I want to implement internationalization. I have created alternative resources like res/values-fr/strings.xml which Contains French text for all the strings, including title Can anyone tell me what to do next... thanks 回答1: You should always have default strings in res/values/strings.xml , because Android tries to use the most specific resource available. If you have for example res/values-fr/strings.xml and res/values-de/strings.xml and the users phone is set to

What is a good interface to allow display in multiple languages

旧时模样 提交于 2019-12-10 20:25:00
问题 I'm working on a website that theoretically should be available in all languages. The interface and content are very simple so this is not a problem. The problem is what internationalization interfaces are usually used to cue the user to the availability of multiple language? The obvious one is a drop down list. Any other good examples of how this has been done elegantly? As a side question: are there any books or material dedicated to the topic of i18n and localization, preferably for PHP

i18n/gettext : setlocale configuration in web applications

痞子三分冷 提交于 2019-12-10 19:51:34
问题 So I started messing around with gettext but I'm still puzzled about certain things, would be great if anyone could help me out and fill in the gaps for me. Usually most of the implementations just invoke setlocale based on a language parameter. Is there any case in which I need to use putenv , perhaps for edge cases on Windows setups? The default language for my php framework is English, UTF-8 - so I'd set LC_ALL to en_US.utf-8 , since en_US is ISO-8859-1/Latin1 and obviously that's not as

Best way of keeping locale-dependent string resources in PHP?

我们两清 提交于 2019-12-10 19:48:15
问题 Let's say you are building a multilingual web application in which all interface text should be moved to language-dependent resources and loaded when needed. The string resource may be huge: say you have several thousands of strings translated. In windowed environments (Windows, OS X, X11) you usually have a mechanism provided by the OS or some API for doing just that and they are usually called string resources. What about PHP then? Remember though, performance must be considered seriously