You need to Register for free and Login to post a message in the forum.

Forum

Subject: Localized ressources
Prev Next
You are not authorized to post a reply.

Author Messages
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

29 Jan 2010 8:23 AM  
Hello,

I would like to add localized ressources on a page like this :

<%$ Resources:MyRessource, String1 %>

I have put the Myssource.lng-LNG.resx file in the App_GlobalRessources folder.

But this doesn't work. I have an error on the page I want to display. How can I add customized labels on a page using the <%$ Resources:MyRessource, String1 %> tag ??

Thank you for information

JM
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

01 Feb 2010 10:46 AM  
up
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


01 Feb 2010 6:56 PM  
Use the TEXT skin object.

You will find additional documentation here.

Joe Craig
DNN Creative Support
Subscribe to the website
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

02 Feb 2010 2:15 AM  
Thank you.

Could you please provide me with an example ? This would be very useful for me.

Thank you very much
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

02 Feb 2010 3:05 AM  
I have set up a test TEXT tag so :

< dnn:TEXT runat="server" ID="mytext1" Text="String1" ResourceKey="test" ReplaceTokens="true" / >

Now I have put a test.resx in the App_GlobalResources folder but it seems my text isn't translated. What am I doing wrong ? I have also put this line in my ressource file : name:String 1 value:Ceci est un test

It seems there is no link with my ressource file. Where should I put it insted of App_GlobalResources ?

Thank you for information.
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


02 Feb 2010 8:59 AM  
DotNetNuke does not automatically translate text.  You need to have "language packs" installed for each language.  The language pack include resource files for a specific language.  So, you will need to add test.resx files for each of the languages that you support.

You will need to follow the structure and naming conventions for each of the languages.

Joe Craig
DNN Creative Support
Subscribe to the website
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

02 Feb 2010 9:28 AM  
I would like just one label to be localized. How do I do this ? Which token do I use ? Can you provide me with a code sample please ?
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


02 Feb 2010 9:41 AM  
I am hardly expert in localization issues.  But, it appears that the German DNN group is one place to go for help (www.dnn-usergroup.de).

What you will need to do, based on a quick look, is provide a resource file for each language.  Inside of the resource file, you will translate your text.  If you've installed the correct language packs and also the localization skin object so that you can switch languages, DotNetNuke will pull the localized string from the appropriate resource file.  You'll need to name the resource files appropriately, too.  Once you have installed a language pack, you can see how that is done.

To me, it looks like you duplicate the resource files, and append language indicators to the file names. That's at least a place to begin.

Joe Craig
DNN Creative Support
Subscribe to the website
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

02 Feb 2010 9:58 AM  
Thank you for you reply.

This is exactly what I have done already. I have built a custom module called gridview.ascx in the Desktop Modules directory. From there I have a App_LocalResources folder in my module folder and then three ressource files named after each language that is : gridview.ascx.resx, gridview.ascx.fr-FR.resx, gridview.ascx.de-DE.resx.

Then I have a test1 line in each of my resource file.

Then on my ascx page I try to call from these files with this tag :

< dnn:TEXT runat="server" ID="mytext1" ResourceKey="test1" Visible="true" / >

I have put "test1" in the ResourceKey label so I think it should call this line from the ressource files, depending on current selected local. And yes I have installed all the necessary language and I can switch from one another through flags on top of the page. All my pages are actually successfully localized, except for this custom module I have build.

It seems I dont know how to use the appropriate tag to call from the ressource files, tho I have put them in the App_LocalResources folder in my module folder. This is how it is done with the other built-in modules.

Seems I am doing something wrong here, which is I can't call from the ressource file.

Thank you for support

JM
Joseph Craig
DNN Creative Staff
Nuke Master V
Nuke Master V
Posts:5354


03 Feb 2010 9:21 AM  
If you look at the Minimal Extropy skin, you will find this:

         < dnn:TEXT runat="server" id="dnnTEXT" CssClass="breadcrumb_text" Text="You are here >" ResourceKey="Breadcrumb" / >

The TEXT skin object is documented here.  It has several attributes.  They include:


  • Text  -- The text to display if there is no text available from a resource file. This is also the name of the key in the resource file that will be used
  • resourceKey -- The name of the resource file (*.resx) to use.

In your example, the resource file would be test1.*.resx.  You didn't include Text as an attribute, so the skin object doesn't know which key to use.


-------
As I said, I'm not an expert here, but this is where I would look.

Joe Craig
DNN Creative Support
Subscribe to the website
jumatthey
Nuke Active Member
Nuke Active Member
Posts:30

16 Feb 2010 3:57 AM  
Still looking for a way to localize my labels. This way -> <%$ Resources:MyRessourceFile, Key %>

That is without breaking up DNN and generating errors.

If anyone has any experience with this, thanks for letting me know.

Regards

JM
You are not authorized to post a reply.
Forums > DotNetNuke® > DotNetNuke® Questions > Localized ressources



ActiveForums 3.7

Latest Forum Posts

Query On Dynamic Form Module by prithviraj
The source element with id dnn$ctr407$DynamicForms$imgMove_48b21a63-ca5a-425d-90ca-599a6e7d51e6 does...
RE: Folder permissions by saintX
Thanks for your answer Rashid! May you please kindly let me know - Which folders - AND for whom...
DNN with Javascript Disabled by aptrivedi
Hi All,I have found my self in bit of trouble.As per my application requriement, i need to handle th...
RE: Change Registration Redirect? by ollep
Well, that sounds good Lee.But I just spent $150.00 and a few days learning the Dynamic Forms  - bec...
RE: Folder permissions by Kazi
Hello FW, The easiest way to set permissions is your control panel, Log in to your CP, click on y...
Folder permissions by saintX
Hello, Can I set the folder permissions on the remote server myself using DW or WVD? If possi...
RE: How to do links? by Guy..L
It's really hard to tell quite how awesome DNN Nav v2 is given the documentation and search results ...
Regarding Editor by prithviraj
Pls let me know whar folders we need to upload when we are changing editors. Suppose i have cute edi...
RE: Change Registration Redirect? by leesykes
It would be best to use Dynamic Registration to avoid 2 registrations.With Dynamic Registration you ...
Indexing DNN pages by Google by Jake Vizner
I have two different DNN web sites. Using Google Webmaster Tools I can see the Google indexed 12 out...
Query Regarding RAD EDitor by prithviraj
Hi, I'm using R.A.D editor in my site. At the time of adding images through the editor I'm unabl...
RE: while installing bulk emailer module in my website by jncraig
Yes, this definitely is a file permissions issue. The default ASP.NET worker task needs to have ful...
RE: Background Music by jncraig
That will work.
RE: Auto create pages and content by dhassall
Hi Joe DNN Out of the box version 4.9 Login as Host with Firefox to create and IE8 to monitor, CTR...
RE: while installing bulk emailer module in my website by dub
Agiline, We have seen this problem before. It is caused by the Security on IIS. Please have a loo...
RE: Change Registration Redirect? by ollep
Probably still want to do it with Dynamic Forms now.My reason for changing (except from getting Aweb...
RE: Change Registration Redirect? by ollep
YES!http://www.dnncreative.com/Subscribe/tabid/81/Default.aspx
RE: Change Registration Redirect? by ollep
Yes I noticed that we where talking about 2 different Modules as soon as I dug into the tutorials.Ab...
RE: Change Registration Redirect? by leesykes
If you are check out the links that I have placed in there:http://www.dnncreative.com/Subscribe/tabi...
RE: Change Registration Redirect? by leesykes
Are you referring to when subscribing there is a link to register and after they register it sends t...
DotNetNuke Modules
RSS Feeds