DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DNN Platform Site localization

 34 Replies
 2 Subscribed to this topic
 22 Subscribed to this forum
Sort:
Page 3 of 4 << < 1234 > >>
Author
Messages
Advanced Member Send Private Message
Posts: 244
Advanced Member
Have you tried the way I suggested with the TEXT skinObject ?
Veteran Member Send Private Message
Posts: 350
Veteran Member
Posted By Ram on 3/11/2024 3:24 AM

Thanks a lot for the detailed explanation. I tried the following 2 ways in Home-Standard ASCX skin file. Cleared the cache and nothing is showing up in the front-end. What am I missing?

1) <%= Localization.GetString("Welcome", "C:\Sites\SITENAME\Portals\_default\Skins\SITENAME\App_LocalResources\Home-Standard") %>  2) 

Also, the following 2 resx files (Home-Standard.ascx and Home-Standard.fr-FR.ascx) are placed under - C:\Sites\SITENAME\Portals\_default\Skins\SITENAME\App_LocalResources\

      Welcome>  

--------------------------------------------------------------------------  

    Accueil>  

 

 

 

Hi, just a few notes/observations:

  • This needs to be something like the following: <%= Localization.GetString("Welcome", PortalSettings.ActiveTab.SkinPath + Localization.LocalResourceDirectory) %>  
  • The RESX files need to have the correct extension and naming convention:
    • "Home-Standard.ascx.resx"
    • "Home-Standard.ascx.fr-FR.resx"  
  • The RESX files need to live in the following folder:
    • ~\Portals\_default\Skins\SkinName\App_LocalResources\

All that said, the suggestion provided earlier by Daniel Valadas would be even simpler.  ;-)

 

David Poindexter


Creator:


Senior Member Send Private Message
Posts: 1513
Senior Member
Posted By David Poindexter on 3/11/2024 11:57 AM

All that said, the suggestion provided earlier by Daniel Valadas would be even simpler.  ;-)

I agree, and it would be far easier for anyone to maintain moving forward.

Advanced Member Send Private Message
Posts: 244
Advanced Member

And to further further clarify it is a different resx file for my proposed solution and David's proposed solution, so make sure you don't confuse them. With David's solution it is for a very specific ascx control and you need .ascx.resx Using the skinObject the file does not have the .ascx part and only ends in .resx and needs to match the skin name exactly. But then it is available for the whole skin and is discovered by convention.

Ram
New Around Here Send Private Message
Posts: 6
New Around Here

David, I tried exactly how you mentioned, but it is not showing up anything :(

Daniel, here is what I did, can you let me know if this is the right direction? How do I invoke/call the resource keys from the various ascx skin files used in the site?

  • Under '..\Portals\_default\Skins\MySin\App_LocalResources\' folder, I have 2 resx files as follows: Home-Standard.resx and Home-Standard.fr-FR.resx

Contents for the french resx file are as follows: (similar content for en-us resx file, except the localized value)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   text/microsoft-resx                   1.0.0.0                   System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089                   System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089            Accueil  

  • Under Site Settings => Languages => Site Templates => Skins => MySkin => App_LocalResources => Home-Standard (I selected the following resource file). I did this for 'Français (France)' language. I performed similar action and selected 'Home-Standard' resource file for English (United States) language also.
Advanced Member Send Private Message
Posts: 244
Advanced Member
Your resx file names are wrong, you need to use your actual skin name and not the view or file name. You are in between one proposed solution and the other here. My proposal is only for the TEXT skinobject usage and for that one the file name is exactly the name of the skin (the folder name)
Veteran Member Send Private Message
Posts: 1184
Veteran Member
Posted By Daniel Valadas on 3/12/2024 9:57 PM Your resx file names are wrong, you need to use your actual skin name and not the view or file name. You are in between one proposed solution and the other here. My proposal is only for the TEXT skinobject usage and for that one the file name is exactly the name of the skin (the folder name)

Agreed, TEXT is the way to go IMO. Here's a working example if you need one (27)

Please note that there are some pages about this containing information that's not completely corrrect. The "Text" attribute should be "ShowText"

The naming convention for th resx files is "myskin.ascx.nl-NL.resx" and not "myskin.nl-NL.ascx.resx"

HTH

 

 

Veteran Member Send Private Message
Posts: 1182
Veteran Member
To give my two cents: The resource file can be named "SharedResources.resx" and "SharedResources.xx-YY.resx" (xx-YY is the culture code for the localized version). Works as well. Happy DNNing! Michael

Michael Tobisch
DNN★MVP

DNN Connect
Ram
New Around Here Send Private Message
Posts: 6
New Around Here

Finally, I got the TEXT object to work with all of your help :). Thanks a lot Timo, Daniel, Michael, David and Will :)

How do I extend this to image/logos, hyperlinks (), tooltips? 

 

Veteran Member Send Private Message
Posts: 1182
Veteran Member
Posted By Ram on 3/13/2024 12:45 PM

Finally, I got the TEXT object to work with all of your help :). Thanks a lot Timo, Daniel, Michael, David and Will :)

How do I extend this to image/logos, hyperlinks (), tooltips? 

Great you got it to work...

Do you mean multi-lingual images/logos, hyperlinks and tooltips in the skin?

Happy DNNing! Michael

Page 3 of 4 << < 1234 > >>

These Forums are dedicated to the discussion of DNN Platform.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved