Oct 06, 2010, 3:32 PM
[CLOSED] Language switch
I'm using Ext.Net in MVC2 as you know.
Now i'm thinking on the right way to implement the language switch....
For now it's done as directevent - but I'm experiencing some troubles with....
viewport (runat="server" script section at the top"
1. After load the default (preset) language isn't marked as active, but if I change the language it's always marked
2. After changing the language, the screen doesn't refresh (except portal portlets)
Questions
- Which approach is preferable to switch language?
- How can further elements be marked refreshable like the portlets?
Cheers
Now i'm thinking on the right way to implement the language switch....
For now it's done as directevent - but I'm experiencing some troubles with....
viewport (runat="server" script section at the top"
// Change culture
protected void ChangeCulture(object sender, DirectEventArgs e)
{
string myLanguage = e.ExtraParams["myLanguage"];
ResourceManager.GetInstance(this).Locale = myLanguage;
this.Session["Culture"] = new System.Globalization.CultureInfo(myLanguage);
}
viewport
<ext:Menu runat="server">
<Items>
<ext:CheckMenuItem ID="LanguageGerman" Text="German" Group="Language">
<DirectEvents>
<Click OnEvent="ChangeCulture">
<ExtraParams>
<ext:Parameter Name="myLanguage" Value="de" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:CheckMenuItem>
<ext:CheckMenuItem ID="LanguageEnglish" Text="English" Group="Language">
<DirectEvents>
<Click OnEvent="ChangeCulture">
<ExtraParams>
<ext:Parameter Name="myLanguage" Value="en" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:CheckMenuItem>
</Items>
</ext:Menu>
Problems1. After load the default (preset) language isn't marked as active, but if I change the language it's always marked
2. After changing the language, the screen doesn't refresh (except portal portlets)
Questions
- Which approach is preferable to switch language?
- How can further elements be marked refreshable like the portlets?
Cheers
Last edited by Daniil; Oct 13, 2010 at 12:13 PM.
Reason: [CLOSED]