[CLOSED] Language switch

Page 2 of 2 FirstFirst 12
  1. #11
    Quote Originally Posted by geoffrey.mcgill View Post
    No, because it's not practical. Adding more client-side JavaScript would be required.

    Changing the Locale/Culture is best done with a page refresh/postback. Refreshing all the culture dependent properties during a DirectEvent (ajax request) is not planned.

    Can you describe the use-case where dynamically changing the Language during an ajax request is required?

    Hi

    I'm just wondering because the half way it works. (Text updates of the master-page and viewport-page do work, the partialresults not - problem as described is - that the the directmethod has to be clicked twice)

    Having a hard reload means that all windows and all tabs eg. the whole application would reload. So I think it's user friendlier to send all updates to the client instead of give out a warning "are you sure to change the language, all unsaved data would be lost".

    Thank you
  2. #12
    Hi,

    Having a hard reload means that all windows and all tabs eg. the whole application would reload. So I think it's user friendlier to send all updates to the client instead of give out a warning "are you sure to change the language, all unsaved data would be lost".
    I am doubt that a user works with unconvinience language first (open tabs, works with some data) and only after some time the user wants to choose to another language. If the user has ability to choose required language then he do it first

    In any way to make correct language choosing with control recreation is not easy at this moment and requires a lot of coding
  3. #13
    Quote Originally Posted by Vladimir View Post
    Hi,

    I am doubt that a user works with unconvinience language first (open tabs, works with some data) and only after some time the user wants to choose to another language. If the user has ability to choose required language then he do it first

    In any way to make correct language choosing with control recreation is not easy at this moment and requires a lot of coding

    Okay I agree - but how can I disable the content resend?

    Request:

     
        // Change theme
        protected void ChangeTheme(object sender, DirectEventArgs e)
        {
            Theme myTheme = (Theme)Enum.Parse(typeof(Theme), e.ExtraParams["myTheme"]);
            ResourceManager.GetInstance(this).SetTheme(myTheme);
            this.Session["Ext.Net.Theme"] = myTheme;
        }
    Response

     
     
    {script:"Ext.net.ResourceMgr.setTheme(\"/extjs/resources/css/xtheme-gray-embedded-css/ext.axd?v=18126\");
    Ext.net.Notification.show({title:\"Theme\",html:\"The theme was successfully changed\",iconCls:\"icon-information\"});
    myLanguageGerman.setChecked(false,true);
    myLanguageEnglish.setChecked(true,true);
    myThemeDefault.setChecked(false,true);
    myThemeGray.setChecked(true,true);
    myThemeSlate.setChecked(false,true);
    myUserGroup.setTitle(\"User\");
    ctl00_Default_ctl05.setText(\"Logout\");
    myChangePassword.setText(\"Change Password\");
    mySettingsGroup.setTitle(\"Settings\");
    ctl00_Default_ctl13.setText(\"Theme\");
    myThemeDefault.setText(\"Blue\");
    myThemeGray.setText(\"Gray\");
    myThemeSlate.setText(\"Slate\");
    myLanguage.setText(\"Language\");
    myProfileButton.setText(\"Profile\");
    myParticularsMenuItem.setText(\"Particulars\");
    myOptionsMenuItem.setText(\"Options\");
    myHelpButtonGroup.setTitle(\"Help\");
    myHelpButton.setText(\"Help\");
    myBugMenuItem.setText(\"Report a defect\");
    myContactMenuItem.setText(\"Contact\");
    myBIButtonGroup.setTitle(\"Business Intelligence\");
    myGeotoolsMapButton.setText(\"Map\");
    Button3.setText(\"Map\");
    Button4.setText(\"Map\");
    myGeotoolsButtonGroup.setTitle(\"Geo Tools\");
    myGeotoolsButton.setText(\"Map\");
    myGeotoolsButton1.setText(\"Map\");
    myGeotoolsButton2.setText(\"Map\");"}
  4. #14
    Hi,

    The script is automatically generated when you set any value to the property (if control is added to any container). Therefore you have to omit those setters if ajax request or you can use the following methods which has each Ext.Net control
    MyControl.SuspendScripting();
    //here you can use any setters without script generation
    MyControl.ResumeScripting();
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 6
    Last Post: Jul 08, 2012, 8:58 PM
  2. switch to custom theme
    By angusbeare in forum 1.x Help
    Replies: 3
    Last Post: Mar 21, 2012, 12:31 PM
  3. Is possible to switch Store DataSourceID ?
    By Aod47 in forum 1.x Help
    Replies: 1
    Last Post: Mar 14, 2012, 4:46 AM
  4. [CLOSED] [1.2] Switch panels?
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 01, 2011, 3:57 PM
  5. Replies: 1
    Last Post: May 28, 2010, 6:52 AM

Tags for this Thread

Posting Permissions