internationalization

How to internationalize quotation marks in a JSP

此生再无相见时 提交于 2019-12-12 03:18:44
问题 I have an application where we are showing quotes from a client in a JSP. The actual text of the quotation is stored in a database and doesn't include the quotation marks. The JSP currently has "{$bean.quote}" which, I pointed out to my boss, is not internationalizable. I've got his approval to internationalize this, but I'm not sure what approach to use. My first one is to do an i18n lookup for startQuote and endQuote and store the character in the table. This feels heavy. Ideas? 回答1: That

Refinery CMS on Ruby Rails: Translating / Localising the Strings in the Blog Module

我的梦境 提交于 2019-12-12 03:15:25
问题 In the blog module for refinery CMS there are some strings in the source code that I would like to translate. When I override the view for _post.html.erb of the blog module there is code like this inside: <%= content_tag(:span, "#{t('by', :scope => 'refinery.blog.posts.show')} #{@post.author.username}", :class => "blog_author") if @post.author.present? %> I would like to localize the "by" string, so that in the blog, the default english "By authorname" is replaced by a phrase in another

i18 message property does not reflect in JSP through Controller

我的未来我决定 提交于 2019-12-12 02:36:16
问题 Appreciate any help as I am lost in getting these things together and JSP does not show spring message as per language which is passed in URL argument. JSP is not getting SessionLocale thru SessionLocaleResolver when different language are selected in welcome.jsp. What am I doing/going wrong. I am using Spring 3.1.1. Thanks in advance <!-- Configures the @Controller programming model --> <mvc:annotation-driven /> <!-- Enables the Spring MVC @Controller programming model --> <mvc:view

How to Load GWT theme Dynamically

本小妞迷上赌 提交于 2019-12-12 02:19:31
问题 I have an application built on GWT with internationaliation. I want to load the GWT theme dynamically.For example:If ( localhost:8080/GWTApps/app.html ) then load this <inherits name='com.google.gwt.user.theme.clean.Clean'/> theme or else ( localhost:8080/GWTApps/app.html&local=ar ) load this <inherits name='com.google.gwt.user.theme.clean.CleanRTL'/> .How to achieve this dynamically any idea or thoughts on this? 回答1: the gwt showcase does it in the EntryPoint. just add these methods and call

JSP Spring internationalization using OSGi as service changing locale not working properly

三世轮回 提交于 2019-12-12 02:09:29
问题 First of all! Don't judge me the reason that I'm using MessageSource as a service. Since I'm in a phase learning OSGi and Spring. I have a project that has many modules, in their pages, since I'm making internationalization for it. I saw that they use the same messages, so I put the codes in a common module that every module uses it. And I shared the message as a service osgi-context.xml: <osgi:service ref="messageSource" interface="org.springframework.context.support

How can I make multi-language website? [duplicate]

隐身守侯 提交于 2019-12-12 01:53:52
问题 This question already has answers here : Closed 9 years ago . Possible Duplicates: Create a webpage with Multilanguage in PHP PHP - how to translate a website into multiple languages? I want to make a site which will have 3 languages - e.g. English, Arabic and Italian; the content sure will be different from one language to another. Should I make different table for each language, e.g.: en_articles ar_articles it_articles each with the same article in different language, or make one table

rails i18n passed params get lost

≡放荡痞女 提交于 2019-12-12 01:53:25
问题 I started using i18n with my app, but all the pages that i access by passing a parameter with the link_to isn't working. so, let's say i'm currently on this page /ar/browse?type=art that i got to via clicking on this link_to <%= link_to "/ART/", browse_url(:type => "art")%> then i decided to change the language via clicking on this: <%= link_to_unless_current "en", locale: 'en', :class => 'my-navbar-link' %> after changing the language, that's what i get directed to /en/browse?class=my-navbar

i18n with RenderAction

人走茶凉 提交于 2019-12-12 01:41:53
问题 I have some fragments in a view as follows: @Html.RenderAction("Foo","Home") Then all the controllers extends BaseController class HomeController : BaseController{ protected override IAsyncResult BeginExecuteCore(AsyncCallback callback, object state) { .... // http://afana.me/post/aspnet-mvc-internationalization.aspx } } What happens is, for every RenderAction call, this is executed as well. But it doesnt need to cause they are child actions. If i have 3 RenderAction call, the above code is

django internationalization: counter is not available when marking strings for pluralization

情到浓时终转凉″ 提交于 2019-12-12 01:37:59
问题 Adding plural to django stings in the code should use ungettext() , where the 3rd parameter is the counter to decide whether it should use singular or plural: text = ungettext( 'There is %(count)d %(name)s available.', 'There are %(count)d %(name)s available.', count ) % { 'count': count, 'name': name } The parameter as counter should be available when ungettext() is called. But in my case, the string and the counter is separated so it's impossible to supply the counter at the right place:

Does anyone have any experience that interceptor(i18n) will cause no value during postback?

做~自己de王妃 提交于 2019-12-12 01:34:52
问题 Assume I have this struts2 form <s:form action="login" method="post"> <s:textfield key="login_name" name="login_name"/> <s:submit></s:submit> </s:form> And also with this struts.xml setting <constant name="struts.custom.i18n.resources" value="messageResource" /> <constant name="struts.devMode" value="true" /> <package name="login" namespace="/" extends="struts-default"> <action name="login" class="actions.index.index"> <interceptor-ref name="i18n"/> <result name="LOGIN_SUCCESS">/Main.jsp<