Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Enable Localization for a Single PageEnable Localization for a Single Page
Previous
 
Next
New Post
6/3/2013 6:42 PM
 
OK... one last question... This is all looking very cool...

But, is there a way I can set the language selector in my skin to only show on localized pages? I think that's the last issue I'm seeing - this looks fantastic! I feel like I can finally use localization.
 
New Post
6/4/2013 9:20 AM
 
Hi Mike,

Thanks for the good feedback!

There is not an easy way to only show the language selector on translated pages, but that is a very good enhancement request.

I think there is a way to do it now, with some server side coding though.. I'll get back to you here once i tried that

Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
6/4/2013 12:11 PM
 
Thanks Erik... Yeah, I was looking at the code the other day as well and I think it would be pretty straightforward - as long as there's an easy way to ask the API what languages a given page has been translated to.

But yeah, that would be fantastic. We do international conferences in different parts of the world - most stuff is all english, but we occasionally want to do sections in spanish, or german, or whatever else. So it would be very cool if I could put the language selector in the skin and have it only show on pages where they've been localized - and there, only show languages the page supports.
 
New Post
6/8/2013 12:36 PM
 

Sorry for the wait ;)

Assuming your skin.ascx file uses the VB language, you can put this in your skin:

<script runat="server">
    
    Protected Overrides Sub OnLoad(ByVal e As EventArgs)
        MyBase.OnLoad(e)
        
        Dim currentPage As DotNetNuke.Entities.Tabs.TabInfo = PortalSettings.ActiveTab
        Dim hideLanguage As Boolean = False
        Dim isDefaultLanguagePage As Boolean = currentPage.IsDefaultLanguage
        If isDefaultLanguagePage Then
            If PortalSettings.ActiveTab.LocalizedTabs.Count() = 0 Then
                hideLanguage = True
            End If
        Else
            If PortalSettings.ActiveTab.DefaultLanguageTab Is Nothing Then
                hideLanguage = True
            End If
        End If
        
        dnnLANGUAGE.Visible = Not hideLanguage
    End Sub
    
</script>


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
6/10/2013 7:49 PM
 

Thanks Erik - this looks great!

I may try to integrate some of this logic into the main code for the language selector. I thought that another nice update might be to make it so you can have it only show the language and not the culture in the drop down. If/when I get a chance to play with it, I'll try to post something back here.

Hope all's well,

Mike

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Enable Localization for a Single PageEnable Localization for a Single Page


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

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

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. 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.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out