Adding a new locale to a Dojo widget - localization

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.

Related

Does jqGrid support localization from resource files with ASP .NET MVC?

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.

Localisation issue

I have set up an MVC4 environment where I have created some localisation using simple resx files in the resources directory. The naming of the file I have used was XXXXX.resx and XXXXX.nl.resx.
This worked brilliantly. I have now changed to a (brilliant) third party application (resxmanager.com) since I expect to use a lot of different languages. This application however, uses the "xx-XX" convention for creating the various language files.
So far, so good. I am able to manage the resource files without any problem. The issue is however, that my application doesn't use the correct resource files. The culture and uiculture indicate that the browser is working in the right (i.e. nl-NL) culture but the proper resources are not selected. I have tried various settings in the web.config ([ui]culture="auto", [ui]culture="xx-XX", [ui]culture="xx" etc) but I'm stuck on what to do next.
Is anyone able to put me into the right direction?

Does Grails use different localization messages based on domains?

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.

How to change TinyMCE language in Umbraco

I'm using Umbraco 4.9. I've downloaded a language pack and installed it in my Umbraco's TinyMCE. I suppose there is a tag in tinyMceConfig.config file that defines the language for richtexts, but I can't find anything. Does anyone know about that?
UPDATE:
I tried:
<config key="language">en</config>
but even the default en language option makes richtext editor disapear.
The language of the WYSIWYG text editor is controlled by the user login.
Under the user select the language you would like to use for the backend of Umbraco.
Out of the box it supports:
Danish
German
English (uk)
Spanish
French
Italian
Korean
Dutch
Norwegian
Swedish (se)
Swedish
If the language you need is not listed there, you have a couple of options. The first option is to create a whole new translation of the Umbraco backend, this involves editing Umbraco translation files etc and and is reasonable sized task.
If you just want the TinyMCE editor translated you can hack the JS so that it uses your translation file instead of the default.
To do this you need to rename a couple of JS files and update one. Basically the principal is that you replace one of the existing languages i.e. en or fr with your own.
There are instructions on how to do this on the post on our.umbraco.org
I don't recommend this approach, if you are looking for new full translation of the backend then why not reach out on the our.umbraco.org forum and see if anyone has already done the translation you are looking for or would be willing to help.

What is a website that ends with a .sd extension?

I know there are:
.aspx
.php
.html
.htm
This is the first time I'm seeing a website with .sd at the end. What exactly does that mean and is there a wiki that explains a bit more?
For example, this website:
http://www.racingpost.com/horses2/results/home.sd
First time I'm seeing it and I'm just curious.
Because the choice of extension is practically meaningless on the web - the content-type header defines the actual format of the content - there are lots of exotic extensions around, mostly defined by the CMS or framework used. I'm pretty sure this is not an "own format" in the sense that "html", "aspx" and "php" differ from each other internally by containing raw HTML, PHP code, or ASP code, but just a "vanity extension" if you will.
Can you show us the web site in question? Maybe somebody can hazard a guess what CMS/platform it was built with.
Edited for the url you added: that specific one is most likely being used with the BlueDragon system, a family of runtime server-side products for the deployment of CFML pages, deployed in possibly a j2ee environment.
for instance you can google the site for references:
http://www.google.com/search?q=site%3Anewatlanta.com+%22sd
or see a servlet debug page:
http://74.125.93.132/search?q=cache:yg7UIh6nRdIJ:www.lucasoil.com/landing_pages/14,3.html/+%22index.sd%22+bluedragon&cd=2&hl=en&ct=clnk&gl=us&client=firefox-a
or you may be referring to the TLD (top-level domain name).
the TLD .sd belongs to country of Sudan which is managed by the Sudan Internet Society:
http://www.isoc.sd/sudanic.isoc.sd/
.sd could be anything. According to Fileinfo.com it is the default extension for some type of audio file.
However, I could make a php page called index.sd and as long as I have my webserver configured in the correct way, it would serve it up as php. That goes for other things as well, .html, .py, .pl... etc, etc.
I would just need to add this to my configuration file for apache:
AddType application/x-httpd-php .sd
According to fileinfo .sd is an audio file.
The Top Level Domain .sd denotes Sudan.
Other than that, you can come up with any extension you want (or even use an existing one) and point it to any handler you want, say, in your web server, or in your code. (In the .NET world, you can define your own MIME types through IIS, or setup Http Handlers in your web.config)
Good old "view source" shows that it is just HTML.
At a guess, it's probably one of the above - it's pretty trivial to get a webserver to arbitrarily treat a file as whatever you want irrespective of its extension.
.sd is for SUDAN
like .in for India
.us for USA

Resources