Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a question concerning the display language menu. Standard that menu is when you click my name in the top corner and there if the language pack is installed you have languages to chose from.

So the actual question is, can i have same kind of language choice menu in a different spot? For example in one or another webpart or just somewhere on the page, in the header or footer? If it is possible how to do it then?

Thanks in advance.

share|improve this question
add comment

2 Answers

The language toggle is actually just a javascript function that sets a cookie and reloads the page. You can put it anywhere.

It was very cleverly named: OnSelectionChange(lcid)

To have for example a French/English toggle, put the following div in your page:

<div class="language-switch">
    <a id="language-fr" href="javascript:OnSelectionChange(1036);">Fr</a>
    |<a id="language-en" href="javascript:OnSelectionChange(1033);">En</a> 
</div>

For auto styling of the selected lang, add the following snippet:

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
            var c = ca[i];
            while (c.charAt(0)==' ') c = c.substring(1,c.length);
            if (c.indexOf(nameEQ) == 0) return     c.substring(nameEQ.length,c.length);
        }
        return null;
    }

$(document).ready(function() {
        var lcid = readCookie("lcid");
        if(lcid) {
            if(lcid == 1033) {
                $("#language-en").addClass("current-language");
                $("#language-fr").removeClass("current-language");
            } else {
                $("#language-fr").addClass("current-language");
                $("#language-en").removeClass("current-language");
            }
        }
});

And put a style on the current-language class (for example, bold font).

Voilà!

share|improve this answer
add comment

If I don't wrong the delegate control that has the ability to change the current regional settings and language is the RegionalSettingsExtensionsDelegate delegate control.

You can find a use of it in the page regionalsetng.aspx in the directory C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

share|improve this answer
1  
no it seems it is not resposible for languages if i use this control it doesnt show languages to choose from ... –  Igorok Feb 14 '12 at 15:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.