internationalization

ant - uptodate task : regenerate only outdated files

和自甴很熟 提交于 2019-12-23 02:18:32
问题 I'm new to ant and rather used to Makefiles. In a project, the i18n language modules named Message_zh.class etc are built unconditionally from zh.po etc with every compile, although they already exist, which wastes much time. I figured these are the relevant parts of build.xml: <target id="msgfmt" name="msgfmt"> <mkdir dir="po/classes" /> <propertyregex property="filename" input="${file}" regexp="[.]*/po/([^\.]*)\.po" select="\1" casesensitive="false" /> <exec dir="." executable="msgfmt">

Spring localechangeinterceptor not working

核能气质少年 提交于 2019-12-23 02:17:16
问题 I searched many topics but I couldnt find a solution.My internalization works when i set defaultlocale in spring-servlet.xml, but I cannot change locale when i clicked link and set new locale. English My xml is below ; <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://www.springframework.org/schema/c" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:context=

Django 1.8 set_language view does not redirect to specified language

牧云@^-^@ 提交于 2019-12-23 00:27:09
问题 In yet another variant of the "set_language isn't working" category of questions, I have this head scratcher. In my page I have a language selector made of three parts: Hidden form <form action="{% url 'set_language' %}" method="post" id="language-form" name="language-form"> {% csrf_token %} <input type="hidden" name="language" id="language" value="" /> </form> Javascript form submission function function set_language(code) { $('#language').val(code); $('#language-form').submit(); } And the

Django 1.8 set_language view does not redirect to specified language

半腔热情 提交于 2019-12-23 00:27:06
问题 In yet another variant of the "set_language isn't working" category of questions, I have this head scratcher. In my page I have a language selector made of three parts: Hidden form <form action="{% url 'set_language' %}" method="post" id="language-form" name="language-form"> {% csrf_token %} <input type="hidden" name="language" id="language" value="" /> </form> Javascript form submission function function set_language(code) { $('#language').val(code); $('#language-form').submit(); } And the

i18n in Google App Engine - PHP

旧巷老猫 提交于 2019-12-22 21:44:55
问题 I'm trying to implement i18n in GAE - PHP via the gettext extension, but it fails, I suppose the extension is not enabled in GAE as of now. I've tried using the php-gettext class, and it works fine, but I'm a bit concerned about its speed. As you can see in this benchmark the class is the slowest method. Do you know any other way I can use? I'd prefer to use the php-gettext class and the .po files rather than string ids, but I also don't want to slow down the site. Thanks a lot! :) 回答1: Since

How to add multilanguage support to a Yocto build?

给你一囗甜甜゛ 提交于 2019-12-22 18:15:26
问题 I'm trying to add multilanguage support to a Yocto build. Reading the official documentation I've found that the build options that controls locale settings are: GLIBC_GENERATE_LOCALES IMAGE_LINGUAS Link: http://www.yoctoproject.org/docs/1.8/mega-manual/mega-manual.html#var-GLIBC_GENERATE_LOCALES After a build with the following options: GLIBC_GENERATE_LOCALES="en_GB.UTF-8 en_US.UTF-8" IMAGE_LINGUAS?="en-gb" if I ask to "localectl" the list of available locales, nothing is displayed (command:

Image localization in asp.net

爷,独闯天下 提交于 2019-12-22 18:06:50
问题 I have a web application which needs to support multiple languages. We currently have quite a lot of images on the site with text in them. Im trying to find a way to localize these images with the least amount of hassle. What i have come up with so far is to add sub folders to the current /Images folder which relate to the required language. So for example /Images contains the default set of images and /Images/es-MX contains the Spanish-Mexican localised images. All pretty standard so far i

how to change default culture settings in a .net web application?

落花浮王杯 提交于 2019-12-22 18:05:05
问题 Our web application (.net/C#) formats currency amounts using amount.ToString("c"), shown localized to a few different regions. Our French Candian users prefer all amounts to be the US format (123,456.99 vs. the default windows way for fr-CA of 123 456,99). What is the best way to handle that ? Can I simply modify the regional settings on each webserver in windows for fr-ca? or do I need to create a custom culture? 回答1: You may want to look into creating a custom culture, providing the mix of

translate my app

本小妞迷上赌 提交于 2019-12-22 17:54:04
问题 What I want to do is provide the user with a spinner which contains several languages, when a language is selected, the app will translate to that language. I have different string files but I have no idea how to implement this. Is this possible? How can I do it? 回答1: In the res folder, respect this : res/ values/ strings.xml values-es / (here for spanish values) strings.xml values-fr / strings.xml (here for french values) Android loads the appropriate resources according to the locale

messages.properties taken from db [duplicate]

血红的双手。 提交于 2019-12-22 14:58:28
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Design question regarding Java EE entity with multiple language support I'm working on i18n of JSF application. I need all standard jsf messages that are usually located in messages.properties to be taken from database. Is there some simple way to do it? Thanks. 回答1: I think I found the answer: public class DBMessagesBundle extends ResourceBundle { @Override protected String handleGetObject(String key){ ... }