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

enter image description here

Is there a way to get the language-switch control as static link in the pagelayout? I want my users to switch between German and English with a single click.

Sorry guys, found a solution :D

<script type ="text/javascript"> 
function OnSelectionChange(value)
{ 
var today = new Date();
var oneYear = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
var url = window.location.href;
document.cookie = "lcid=" + value + ";path=/;expires=" + oneYear.toGMTString();
window.location.href = url;
}
</script>

<a href="javascript:OnSelectionChange(1031)">German</a>
<a href="javascript:OnSelectionChange(1033)">English</a>
share|improve this question
    
oh you found answer while I was formatting mine :) –  Vedran Rasol Jan 20 '12 at 15:42
    
Answer to your question, in order to mark it as an answered question. –  Steve B Jan 20 '12 at 15:43
    
Steve B I need to wait 8 hours before i can -.-' –  fr34kyn01535 Jan 20 '12 at 16:17
add comment

1 Answer 1

up vote 6 down vote accepted

If you examine page source you will see that Select Display Language > Language calls simple javascript:

OnSelectionChange(1033);

Where 1033 is language id.

I have tried launching this form FireFox FireBug console and it works. So your link could be something like:

<a href="" onclick="OnSelectionChange(1033);">English</a>

You can also check this article:

Change language of UI using custom control in SharePoint 2010

share|improve this answer
    
Ya, am sorry; but thank you for answering :D –  fr34kyn01535 Jan 20 '12 at 16:26
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.