internationalization

How to localize a Rails plugin?

本小妞迷上赌 提交于 2020-01-02 09:29:42
问题 I'd like to translate the OpenIdAuthentication plugin into another language but I'd like not to change the plugin directly. Here's the basic structure of the messages I want to translate: module OpenIdAuthentication class Result ERROR_MESSAGES = { :missing => "Sorry, the OpenID server couldn't be found", :invalid => "Sorry, but this does not appear to be a valid OpenID", :canceled => "OpenID verification was canceled", :failed => "OpenID verification failed", :setup_needed => "OpenID

Eclipse French support

会有一股神秘感。 提交于 2020-01-02 07:58:06
问题 I need to enter some French chars in eclipse. How do I configure eclipse to enter French? I do have all the fonts that come with default eclipse packaging. 回答1: Preference / General / Workspace / Text file encoding In my configuration, I see Cp1252 (probably set after my OS current setup) and have no problem with any French character. UTF-8 is a more general setting which will accommodate any OS language setup. As noted in this blog entry, this should be UTF-8 by default, for encoding

Emoji/International Keyboard

*爱你&永不变心* 提交于 2020-01-02 07:47:48
问题 I would like to create my own emoticon keyboard in iOS 5. Would this replace the now standard emoji keyboard? In my search for answers, i havent found much on how to create/install the keyboard. From my understanding the process would be along these lines: -create array or something of the sort (build of a keyboard template file?) - have an app that installs this keyboard under international keyboards - then just enable the keyboard to be available in all apps. thanks, in advance for any help

Rails not picking up custom date & time formats in en.yml

半腔热情 提交于 2020-01-02 07:35:56
问题 I'm not that familiar with I18N in Rails so bear with me. Trying to set a custom date & time format: #config/locales/en.yml en: date: formats: long_dateweek: "%A, %B %d, %Y" time: formats: very_short: "%H:%M" But when I try to use them I just get the default formats: 1.9.3p194 :001 > Time.now.to_date.to_s(:long_dateweek) => "2012-08-22" 1.9.3p194 :002 > Time.now.to_time.to_s(:very_short) => "2012-08-22 16:12:47 -0700" Tried restarting console (and even the server) to no avail... What'd I miss

i18n translation in JSP custom tag

旧街凉风 提交于 2020-01-02 06:57:09
问题 Is it possible to write a custom JSP tag to take an i18n message key and output the translation phrase for the given request? Normally in JSP/JSTL, I do: <fmt:message key="${messageKey}"><fmt:param>arg1</fmt:param></fmt:message> And I get the translation phrase. Now I need to do the following (there's a good reason for this): <custom:translate key="${messageKey}" arg="arg1"/> But I don't know how to look up the translation in the custom tag code. The TagSupport base class provides a

Prefix routes with locale in vue.js (using vue-i18n)

本小妞迷上赌 提交于 2020-01-02 06:55:32
问题 I have a locale.js file which is responsible for defining user locale. Here it is: import store from '@/vuex/index' let locale const defaultLocale = 'en_US' if (store.getters['auth/authenticated']) { locale = store.getters['auth/currentUser'].locale || defaultLocale } else { if (localStorage.getItem('locale')) { locale = localStorage.getItem('locale') } else { locale = defaultLocale } } export default locale Also I have a i18n.js file which is responsible for making i18n instance which I use

Korean characters are displayed as empty boxes on JTextField

拟墨画扇 提交于 2020-01-02 06:13:42
问题 JTextfield does not show korean charaters properly. It shows empty boxes in instead of characters. Here is the screenshot of my application. 回答1: Thats because of the fonts that you used. According to this oracle document Korean letters is not supported by Lucida font. Note that of the writing systems that are generally fully supported by the JRE, the Lucida fonts do not support Chinese (Simplified), Chinese (Traditional), Japanese, and Korean. So if you use the fonts that support the korean

Resource Bundle Spring

╄→гoц情女王★ 提交于 2020-01-02 03:27:05
问题 How can I access the messages from a resource bundle in Spring MVC inside a class that extends from AbstractController ? I have tried getMessageSourceAccessor().getMessage("a.message"); but it it throws this Exception: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.context.NoSuchMessageException: No message found under code 'a.message' for locale 'en'. When I do the same inside a jsp it works <spring:message code="a

How to properly dput internationalized text?

隐身守侯 提交于 2020-01-02 02:38:25
问题 I have a bunch of author names from foreign countries in a CSV which R reads in just fine. I'm trying to clean them for upload to Mechanical Turk (which really doesn't like even a single internationalized character). In so doing, I have a question (to be posted later), but I can't even dput them in a sensible way: > dput(df[306,"primauthfirstname"]) "Gwena\xeblle M" > test <- "Gwena\xeblle M" <simpleError in nchar(val): invalid multibyte string 1> In other words, dput works just fine, but

xslt localization

不羁的心 提交于 2020-01-02 01:20:27
问题 I am having following xml file: - <?xml version="1.0" encoding="UTF-8"?> <directory> <employee> <name>Joe Smith</name> <phone>4-0192</phone> </employee> <employee> <name>Sally Jones</name> <phone>4-2831</phone> </employee> </directory> And following xslt : - <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:template match="directory"> <div>List of Employee<xsl:value-of select="@directory"/>