Hi,
When displaying just text in the language selector is there anyway to display just the language name not the region
ie: Show 'English' instead of 'English (US)'.
There used to be a module Apollo Language Selector that could do this but that does not seem available anymore
Thanks in advance for any help given
Tony
Hi Tony,
Here's a list of tokens you can use:
Token
Description
Core Token replace
You can use all the DNN core tokens in these templates
[CULTURE:DISPLAYNAME]
Gets the culture name in the format " ()" in the language of the localized version of .NET Framework.
[CULTURE:ENGLISHNAME]
Gets the culture name in the format " ()" in English.
[CULTURE:LCID]
Gets the culture identifier for the current CultureInfo
[CULTURE:NAME]
Gets the culture name in the format "-".
[CULTURE:NATIVENAME]
Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.
[CULTURE:TWOLETTERISOCODE]
Gets the ISO 639-2 three-letter code for the language of the current CultureInfo
[CULTURE:THREELETTERISOCODE]
Gets the ISO 639-1 two-letter code for the language of the current CultureInfo
[URL]
This will generate the correct URL for the current page in a specific culture
[FLAGSRC]
The name of a flag image (.gif only) for a specific culture, in the format "-.gif".
[SELECTED]
Returns “True” if a specific culture is the current culture.
[LABEL]
Inserts the Label text from the resource file.
[I]
Returns the directory that holds the core country flag images (/images/Flags)
[P]
Returns the portal directory
[S]
Returns the directory of the current skin
[G]
Returns the global (host) skin folder
Examples:
Example Code
Default configuration in default DotNetNuke skin.
Displays only dropdownlist
' />
Displays dropdownlist and flag of currently selected language
[CULTURE:NAME]'/>
Displays text links for languages. Selected language has different Classname
there is also an extended language selector skin object from interzoic, but i didn't test compatibility with DNN 8 or 9 yet
https://www.interzoic.com/languageskinobject
Hi Timo,
Unfortunatly none of those tokens work they way I want. They show the region like 'English (Canada)'
Hi Sebasation,
I had tried registering on that site yesterday to download the object, unfortunatly the registration does not seem to work. I have contacted them to ask for help
I could create my own object if I knew how to get the different urls of a page for each language...any pointers ?
Regards
Posted By Tony Stallan on 14 Nov 2019 09:31 AM Hi Timo, Unfortunatly none of those tokens work they way I want. They show the region like 'English (Canada)' Tony
Hmm, right. I think that needs to be added to the core then. A quick and dirty solution would be:
< span class="[CULTURE:TWOLETTERISOCODE]">< /span>
CSS:
.EN:after{ content:English;
}
Great idea, I will give that a go
Many thanks Timo
Worked like a charm.
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:
Awesome! Simply post in the forums using the link below and we'll get you started.