Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So instead of having a dropdownbox, I'd like it to be plain text like this :
NL | FR | EN
How can I do this ?
You could replace the default language selector by your own if you download the source code from Codeplex and take a look at the existing selectors as an example. The selectors are two user controls: LanguageSelector.ascx and LanguageSelectorForWebForm.ascx (for when web forms are used) together with their corresponding codebehinds (.ascx.cs files).
Thanks for taking an interest in this package! By the way, if you develop your own version of the selector and would like to contribute it, please feel free to create a pull request on Codeplex.
Thanks Dimitri, I'll give it a try and post the result later !
I've started making some adjustments to the source code, but how do I 'rebuild' the package with my adjustments?
If you have downloaded the source solution from Codeplex, you need just one more thing before you can rebuild it. The project references some Umbraco dlls, and the references to them will probably be broken. I do not redistribute these dlls, since I have not built them myself but you can use the ones from your Umbraco installation.
So, to do this simply, you would need to create a folder called UmbracoBinaries inside the Dimi.Polyglot project folder and copy the dlls from your Umbraco installation there. If you still get errors due to missing references, you could just re-add the references that appear to be broken (I think they will have a yellow sign over them in Visual Studio).
Once you have managed to rebuild the project's dll, you can copy it into your Umbraco installation's bin folder (I hope that you do this on a test version first:)). If you modify files other than the binary, you need to copy those in the respective Umbraco folders, over the ones initially installed by the package.
I hope that this helps! (And that I have not confused you further:))
Hi Dimitri, I'm close to finding a solution but I could really use your help.
This is the code I have so far :
private void ShowLanguages()
var redirectQs = new QueryString(Page);
var jsRedirect = redirectQs.AllUrl;
if (redirectQs.Parameters.Count == 0) jsRedirect += "?lang=";
else jsRedirect += "&lang=";
var sb = new StringBuilder();
//sb.Append("<a href='" + redirectQs.AllUrl + "'>NL</a>");
sb.Append("<form method=\"get\" action=\"" + redirectQs.AllUrl + "\">");
foreach (string key in redirectQs.Parameters.Keys)
sb.Append("<input type=\"hidden\" name=\"" + key + "\" value=\"" + redirectQs[key] + "\" />");
// "' + this.options[this.selectedIndex].value\" >");
foreach (var language in AvailableLanguages)
var selected = string.Empty;
if (language.ISOCode == SelectedLanguage.ToLower())
selected = " selected=\"selected\" ";
"' + this.options[this.selectedIndex].value\" >" + language.ISOCode + "</a>");
//sb.Append("<noscript><input type=\"submit\" value=\">\" /></noscript>");
LanguageDropDownListLiteral.Text = sb.ToString();
I'm almost getting the desired result. I'm seeing this on the website : nlfren. So it means he can find the languagues. But I'm having trouble with the links.
This is the HTML code after the website is rendered:
Thank you in advance!
I don't really understand what you mean with rendering the whole link using my C# code?
I'll give the other option a try!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted