jQuery UI Widgets Forums Scheduler How to change translation on runtime

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • How to change translation on runtime #101106

    NotAFan
    Participant

    How to change the translation on runtime without reload page or destroy/rebuild the whole sheduler?

    1. Step:
    The sheduler should be initialised with a preveously saved language-Object (for example TranslatedStringsObjectJapanese. Thats no problem.

    2. Step:
    I have buttons to switch between some languages as for examle japanese, french or kisuaheli.
    What I want is, that the user click on a button and the language is changed ad hoc.

    
    $('#ButtonID').on('click', function (event) {
             $("#ShedulerID").jqxScheduler({ localization : TranslatedStringsObjectFrench });   
        });
    

    Click on the Button don’t do anything.

    Do I have to do some kind of refresh? ( I can’t see something like this in your documentation.)

    How to change translation on runtime #101158

    Martin
    Participant

    Hello GrayWizzard,

    Yes, you should call the “render” method after setting the new localization object:

    $('#ButtonID').on('click', function (event) {
             $("#ShedulerID").jqxScheduler({ localization : TranslatedStringsObjectFrench });   
             $("#ShedulerID").jqxScheduler('render');
        });

    Best Regards,
    Martin

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.