| |
|
|
|
|
|
|
|
Vicenç Masanas

|
|
|
 |
|
|
The DotNetNuke Projects are a special category of platform extensions which are developed by volunteers to conform to the high professional standards mandated by DotNetNuke Corporation. The DotNetNuke Projects are distributed as a standard part of the DotNetNuke core application release offerings.
|
|
|
 |
|
|
|
|
| DotNetNuke® Project :: Localization
|
|
|
DotNetNuke is used internationally by web developers to quickly build professional web applications. Given the International community that DNN serves, it is necessary to allow DNN to build systems that cater to the specific culture of both the hosting organization, and the individual end users/site visitors. In some instances, these sites will serve a wide range of cultures while other sites target a specific culture.
Our goal is to provide a set of know procedures to simplify creation of multilingual web sites. This will include a common API for Core DotNetNuke as well as 3rd party modules, standard procedures to add new languages, resource management, built-in support for translating resource files, etc.
The initial release of Multilingual Translations includes only static translations. This means that DotNetNuke framework will convert static strings, but will not convert "dynamic content" (i.e. content stored in the database).
We highly encourage everybody who's interested in this area to participate in our Forums and get involved in improving DotNetNuke ML support.
|
| |
 |
| Localization Project Blog
|
|
|
Jun
16
Posted by:
Vicenç Masanas
6/16/2006 9:00 AM
In pre DNN 3.3 / 4.3 versions we had three different sets of resource files:
- Base resources: these are the english (en-US) resource files that come with the product. These are considered the default and base for all other resources, and the last fallback resort when searching for a given resource string.
- Translated resources: these are any given set of resources for a specific language other than the default one. These can also be considered the base resource files for a specific language.
- Custom portal resources: when you wanted to overwrite a given message on a given portal you could create a personalized version of the resource file that included that message and provide a different version of the message. This customized version would only be aplicable in the portal for which it is defined.
With this approach we already had a great deal of flexibility to provide static localization for our portals. But it had two major problems for even improved extensibility:- If you wanted to customize a given resource key for ALL portals in a given installation you had to modify the base resource files. But now imagine what will happen when you upgrade your installation to a new DNN version or install an updated version of the language pack for that specific language. The modifications you made to the original file would be lost since (on upgrade or reinstall of languages packs) this file would be overwrote.
- When creating a custom portal resource file ALL resource keys from the original file where copied to the customized version, even if only just 1 key was modified. This is not necessary, actually the customized file should only contain the keys that have a value different than the default one.
So to cover these issues we introduced some modifications on the language editor to support them:
- Host customized resources: this is similar to the custom portal resources but the changes made here will apply to all portals on the installation. This will save you from doing modifications on the base resource files and prevent losing them when you install a new version.
- Incremental resource files: all customized resource files (host or portal) will use an incremental/partial approach, in the sense that they will only contain the keys that are different from the base resource file.
- Display of default value: in previous versions, the default value for a resource key on the language editor was always the base english version. We changed this so the default is now take from the base resource file for the current language if you are editing a custom file or english when you are editing the base resource files.
So when creating a custom portal resource for spanish the default value will be the value from the base resource file for the spanish language pack, because in fact you are creating a customized version for this specific value.
 Another great feature we added on the localization is to help modules reuse resource strings. Again, in previous versions all .ascx files had they related resource file where we added the resources. The issue was that all keys used in user interface by means of a "resoucekey=" attribue were local to any .ascx control. This was a bit boring since usually all modules tend to repeat the same messages and labels on most of the modules controls it includes. So you had to include again all the same keys in all resource files where they were needed.
We changed this to leverage the use of the module "SharedResources.resx" file. Now all keys included in this will also be available from the declarative part of the .ascx control. So you will be able to move the messages that are used on more than one control to this file. This will be a great help for translators since they will only have 1 version of these items.
Tags:
Re: Enhancements to DNN localization
I have 1 localization mistery. If I add a custom profile property in a portal, In what file do I put the localized name so the admin functionality of my portal picks it up?
By purplebox on
6/17/2006 5:38 PM
|
Re: Enhancements to DNN localization
Dear Vicenç, the enhancements look great with one exception: Display of default value. Please note that when a translator decides to modify the default language pack, he is probably not satisfied with the current translation. Therefore, what he needs for better translation is rather the ORIGINAL (English) default than its (possibly strangely) translated counterpart.
By microworks on
6/19/2006 7:48 AM
|
Re: Enhancements to DNN localization
microworks: I understand what you mean. And I thought about that scenario.
But this a decision I had to made and I sincerely think the best approach is the one currently active. The reason is new "incremental" approach to resources files: if the default was still english in all cases it will be very difficult to manage that case. But even if it was not the case, when I want to change something I don't like in a translation I don't want to see the english defaults but the ones I'm changing. For me this makes more sense.
By vmasanas on
6/19/2006 7:52 AM
|
Re: Enhancements to DNN localization
purplebox: The file is admin\Users\App_LocalResources\Profile.ascx.resx
This is a pending issue in the profile section. We are aware of it and will add support for profile fields localization in a future version.
By vmasanas on
6/19/2006 7:57 AM
|
Re: Enhancements to DNN localization
Vicenç, The problem is that if the original translation was crap, then you need to see the english word, from which all translations should be derived, to figure out what the correct translation should be. Seeing the crappy translation, to me, doesn't seem like it would be that helpful.
By jbrinkman on
6/22/2006 5:32 PM
|
Re: Enhancements to DNN localization
Following on Purplebox's question... I made the desired changes in admin\Users\App_LocalResources\Profile.ascx.resx but when I upgraded to 3.3.1, they got overwritten... isn't there a way to prevent this?
Also, there are two forum threads asking this same question, it would be helpful if you could respond to these as well: http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/108/threadid/44930/scope/posts/Default.aspx http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/118/threadid/45767/scope/posts/Default.aspx
By davido on
6/22/2006 5:32 PM
|
Re: Enhancements to DNN localization
The solution for now is: -Create a new file in admin/Users/App_LocalResources called, Profile.ascx.Host.resx -Added new and changed Profile Properties to it.
Now, during upgrades, this file should not be overwritten as it will not exist in the upgrade release.
To simplify, you can also copy your existing Profile.ascx.resx file to Profile.ascx.Host.resx and then remove all items your not over-riding and/or use the existing entries as a template for your new entries
By davido on
6/22/2006 8:09 PM
|
Re: Enhancements to DNN localization
Actually, what would be even more correct is to add these items to the Profile.ascx.Portal-X.resx file. Since each portal can have diferent profile properties this is the place where this info should reside.
The problem in both cases (host & portal resource files) is that the language editor will not recognize these entries since they will not be present in the base Profile.ascx.resx resource file.
So if you use the lang. editor with any of the solutions above these entries will be automatically removed from the file. So DON'T USE THE LANG EDITOR to translate these items or you will loose them.
This is one of the pieces that needs some more work.
By vmasanas on
6/22/2006 8:13 PM
|
Re: Enhancements to DNN localization
Joe, I understand your point here, but I also see the value in the way it is now. Maybe we could consider a "double default" system for a future version.
By vmasanas on
6/22/2006 5:35 PM
|
Re: Enhancements to DNN localization
Davido, we are aware of this problem but due to time constraints we were not able to work a solution for released package. It's in our roadmap to provide a solution for this as soon as possible.
By vmasanas on
6/22/2006 5:38 PM
|
Re: Enhancements to DNN localization
When will dynamic localization come along?
By simonech on
6/22/2006 5:31 PM
|
Default displayed
Well, the best approach would be to see BOTH original English and the current translation. Anyway I understand your reasons.
By microworks on
6/22/2006 5:30 PM
|
Re: Enhancements to DNN localization
Would it be possible to ad HTML to the language editor. Right now, notifications in DNN seem to be "text-only". That's pretty boring for a system that is so forward looking elsewhere.
Cheers!
By Rob Poretti on
2/8/2007 11:22 AM
|
Re: Enhancements to DNN localization
Tomas, try the google language tools here: http://www.google.com/language_tools?hl=en
Skyscraper, in this context, refers to a banner that is higher whan wider (for example the one on right of this page: http://dotnetnuke.com/tabid/795/Default.aspx).
By vmasanas on
8/1/2006 7:58 AM
|
Re: Enhancements to DNN localization
ok, it's good but any asian lang is write right to left (Persian, Arabic , ...) but not any module is support direction i'm add the "Direction" filed in table "TabModules" & "Tab" , and add "Direction" Parameter to skin module to fix this problem, if this options is default in next core release is better.
By NKM on
6/2/2007 7:14 AM
|
Re: Enhancements to DNN localization
hi, i was add "dir" parameter to *.resource file to create a default direction for any lang, check it for use to new relase
By NKM on
10/3/2007 11:35 AM
|
Re: Enhancements to DNN localization
Vicenç, I’m looking at the GlobalResources.resx, where I found the word Skyscraper, which I’m not familiar with. I have tried to find any other synonym and other meaning of the word, with no success. Is this a normal English word?
Skyscraper Tomas
By WhiplashInfo on
8/1/2006 7:56 AM
|
Re: Enhancements to DNN localization
Could we localize the page title? I am trying to create a web site with multi-language support. However, it seems DNN does not allow us to localize the page name. Is it?
By bigwolf on
6/2/2007 7:15 AM
|
Re: Enhancements to DNN localization
Vicenç, Thank you very much for introducing the new default translation system, as requested by jbrinkman and davido. It is really helpful to be able to read the original-original as I'm working on the translation, and re-working on it. This feature wasn't present in v4.5.1, but is available in v4.5.3.
By dnnregister on
7/12/2007 7:55 AM
|
|
| |
 |
|
|
|
|
Get Smarter Mail, SmarterStats, SmarterTickets Windows mail server, web log analytics, and customer service management software - Free Editions Available! www.smartertools.com
|
DotNetNuke Modules, Skins, Training and Consulting If you want DotNetNuke done right then look no further. Developed Solutions provides module development, skin design, user and developer training and consulting. Based in Adelaide, Australia, we offer our services worldwide. www.developedsolutions.com.au
|
Venexus, Inc. Need custom a custom DotNetNuke module? From module planning to deployment, including training and support, Venexus developers deliver end-to-end web solutions on time and on budget. www.venexus.com
|
|
|
|