locale

JSF - message bundle always uses default properties file

≡放荡痞女 提交于 2019-12-25 02:24:53
问题 I cannot get locales to work. System EAR and WAR Glassfish: 3.12 Hibernate 4.2 - jar's on EAR and WAR Mojarra: 2.1.11 Primefaces: 3.3 Omnifaces: 1.1 Property files in source folder: messages_de.properties <- using german language messages.properties <- using english language faces-config.xml: <locale-config> <default-locale>en</default-locale> <supported-locale>de</supported-locale> </locale-config> <message-bundle>messages</message-bundle> <resource-bundle> <base-name>messages</base-name>

Spring locale messages don't work only within spring:form tag

旧时模样 提交于 2019-12-25 02:09:06
问题 Hello I have a form input button as follows : <form:input path="creationUsr.lastName" type="text" name="creationUsr.lastName" id="creationUsr.lastName" class="login-text" placeholder="<spring:message code='tile.form.lastName'/>" value=""/> Here is my spring context locale setting : <mvc:interceptors> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/> </mvc:interceptors> <bean id="localeResolver" class="org.springframework.web.servlet.i18n

How to define the locale of an application in .NET

吃可爱长大的小学妹 提交于 2019-12-25 01:32:27
问题 I have an application developted with Visual C++ 2008 Express Edition under Windwos XP, which runs propertly on one computer, where the default langaunge is set to English. However, if run the same application on a different computer with default language German, I run into troubles because a predefined string Infinity is not recoginzed during conversion to double using ToDouble , because on the German platform the string should be Unendlich . In particular the mscorlib throws correctly a

Locale date format in PHP5

霸气de小男生 提交于 2019-12-25 00:57:20
问题 my site changes its locale dependent upon either user settings or browser settings (where the user hasn't set their preference). I am using amline charts, the stock chart specifically, which requires the date format in 'MM/DD/YYYY' or 'DD-MM-YYYY', I guess so the chart knows how to understand the dates. There are many ways to format a date dependent upon the computer locale, however I can't find a way to get the locale format (as above). 回答1: What's the problem? date('m/d/Y') or date('d-m-Y')

Trying to change Android Locale on the fly

≯℡__Kan透↙ 提交于 2019-12-24 22:18:10
问题 I'm familiar with Java, but just learning Android Programming. I liked the color bars in their Hello, LinearLayout example quite a bit, so I've been trying to expand that into a little program I can use with my 13 month old. I have it displaying seven colors with labels and four rows. One thing I'd like to do (since I'm bilingual), is to be able to change the Locale display language on the fly, without quitting the app, loading a new locale, and starting the app again (which works, but it's

How to detect if the current locale uses 12-hour or 24-hour time format?

牧云@^-^@ 提交于 2019-12-24 15:10:50
问题 I searched for an answer to this question, but all I found is how to show 12-hour versus 24-hour time format rather than when to do that. My question is similar to this one: How to determine if current culture/locale uses am/pm or 24-hour time? but I want to know if we have similar structure to CurrentCulture or CultureInfo in Rails. I believe with use of locales it should be possible, but I do not know how to do it or if there is any database explicitly mentioning which languages use

Sailsjs req.setLocale outside controller

假如想象 提交于 2019-12-24 14:31:32
问题 I want to set the locale to other language than the default one, in cronjob scheduler. https://github.com/ghaiklor/sails-hook-cron The cronjob scheduler code looks like that: // ['seconds', 'minutes', 'hours', 'dayOfMonth', 'month', 'dayOfWeek'] module.exports.cron = { job: { schedule: '0 0 12 * * *', onTick: function() { SomeService.sendSms() }, timezone: 'Asia/Jerusalem' } } But I cant set the locale because its not a controller but a service and I don't have access to req.setLocale

boost translate: po file not work

笑着哭i 提交于 2019-12-24 13:52:43
问题 I was used boost::locale to make a multilanguage exe, but it doesn't work. The exe always output "Hello World". How can it output "您好"? I used the example code from http://www.boost.org/doc/libs/1_53_0/libs/locale/doc/html/messages_formatting.html #include <boost/locale.hpp> #include <iostream> using namespace std; using namespace boost::locale; int main() { generator gen; // Specify location of dictionaries gen.add_messages_path("."); gen.add_messages_domain("hello"); // Generate locales and

Locale troubles

夙愿已清 提交于 2019-12-24 10:50:08
问题 Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32. >>> locale.getdefaultlocale() ('ru_RU', 'cp1251') #ok, Russian locale is set, as per user settings >>> a = datetime.date.today() >>> a.strftime("%B %d") March 22' #ouch, that's not Russian. >>> locale.setlocale(locale.LC_ALL, 'russian_russia') 'Russian_Russia.1251' >>> a.strftime("%B %d") 'Март 22' #now it's ok So... Why doesn't it work without resetting the default locale? Is it OS related? Is there a way to

How to set JSP response locale in Jetty 7/8?

你说的曾经没有我的故事 提交于 2019-12-24 10:49:17
问题 If I set the HTTP response locale programmatically in a servlet as follows: @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setLocale(SOME_LOCALE); // .. etc } Then under Jetty 7 and later, any JSPs trying to read that locale via the expression ${pageContext.response.locale} will get the server's default locale instead of the one set above. If I use Jetty 6 or Tomcat, it works fine. Here's the full code