I have the following .properties files in a new Grails 2.1.0 app:
messages.properties
messages_sv.properties
Will the values from messages_sv.properties be used when a user hits our www.mysite.se URL, or are the messages loaded based purely on the browser’s language settings?
Messages are resolved by locale independently of the URL. If you’d like to change the locale, take a look at the the i18n documentation to get a better understanding of internationalization in Grails.
Related
I am using vorto plugin in my Umbraco 7 application to achieve the multilingual capability.
I mentioned the URL in hostname as 'localhost/clientname/en'.
Whenever I open login page the URL which is getting form is 'http://localhost/clientname/en/login'.
This is the structure of vorto URL writing.
But can I achieve it like 'http://localhost/clientname/login/en' ???
I want language names at the end of the URL, not in between.
Is it possible ?
Please help....i am badly stuck in my project task !
It sounds like you need a custom URL provider, setting the domain to 'localhost/clientname/en' will mean that the URLs will always get added AFTER the language part as the host is always the first part of the URL.
Have a look at this article on URL providers and content finders: https://24days.in/umbraco-cms/2014/urlprovider-and-contentfinder/ it's quite old, but it should still work. That should give you an idea of how to make it work. Basically you want the URL provider to append the language to the end of the URL, and the content finder to strip the language from the end and then find the actual content. You can also then set the language of the current thread in the content finder so that Vorto and Umbraco are using the correct language based on the URL.
I’m trying to understand how the Convention plugin determines when to do URL interpretation. In some REST Plug-in examples I see PrefixBasedActionMapper configured with ”/rest:rest,:struts” and it seems that Convention is only applied to the rest mapper and not the DefaultActionMapper. Is this correct? Either way, under what conditions does the Convention plugin kick in for requests?
I’ve been googling like a mad-man these last two days and can’t seem to find any explanation. Inspecting the plugin source didn't give any insights either.
They are different. Convention Plugin is not about URL/action mapping. It just search java classes and create action configs from them.
However, you can tell the plugin to search specific root packages using the property struts.convention.action.packages. e.g.
<constant name="struts.convention.action.packages" value="com.mycompany.myactions.myconvention.*"/>
I have a multilingual website. The localization plugin seems to translate only the content, but leaves a path in the default language. How do I change a path to the selected language?
One solution is to use the Translate Extended plugin https://octobercms.com/plugin/excodus-translateextended
This plugin can prefix all routes with SEO-friendly locale short code like :
mysite.ch/fr/contact
mysite.ch/de/kontact
I'm planning on implementing jqGrid on a project that requires multiple languages. Can someone please confirm if jqGrid supports location with ASP .NET MVC by using the text from resource files? Any sample project would be very useful.
Thanks,
Imran
You can use setLabel to change column headers and setCaption to set the title of the grid. You can need to call setColWidth method, autoResizeColumn or autoResizeAllColumns additionally to change the width of the column after changing the column headers.
Free jqGrid supports locale option. One can load multiple locale files at once. The default language displayed in grid will be the language of the last included locals file grid.locale-XX.js, but you can use locale option (like locale: "en-US" for example to specify another locale). See the wiki article for more information. There are exist currently no method which would refresh the texts of the pager if locale option will be changed dynamically.
I recommend you to read the old answer, this one and this one which shows some ideas which can you use in your solution.
I use the DojoX Enhanced Grid widget, which comes with translations for a few languages(locales) built in:
See http://svn.dojotoolkit.org/src/tags/release-1.6.1rc2/dojox/grid/enhanced/nls/
If I want to add a new locale (let's say cn (chinese) or ru (russian)), how do I do that?
If I were hosting Dojo locally, that would be rather trivial (I would just add a folder under the dojox/grid/enhanced/nls/ directory for the locale of my choice and provide translations over there), but in my case, I have dojo loaded from a CDN.
That is quite easy. You can configure many global properties (including locale) via dojo config object, before dojo.js is loaded. http://dojotoolkit.org/documentation/tutorials/1.8/dojo_config/
Found out that the correct locale code for chinese is zh, not cn. Both chinese and russian are already supported by dojox/grid.
I don't think there's a way to add a new language, (say Hindi or Latin), without hosting dojo locally. Even with dojo hosted locally, it's not a trivial matter of adding a new folder for that locale; there's something more to be done with it that I don't know.