How to combine locale with backend in webix?

Hi, we are using in our system the local localisation in the client side. However, we want to carry localisation words to server side. Is there any way to combine it with built-in webix localisation?

Tagged:

Comments

  • edited October 7

    Hi, we are using language localisation in the client side. However, we want to carry it to server side. Is there any way to combine it with built-in webix localisation?

  • Hi @Yryskul ,
    You can store locales on the server. However, the locales must be set before the application init. Please take a look at the snippet:
    https://snippet.webix.com/rc9dd78l
    or like this: https://snippet.webix.com/7w107ibd

  • @annazankevich Hi, how can I set for Locale plugin language from server side in first initialize time. I am using Locale plugin. I found that setLangData("ru", json.data) can be used to set language in the toggle function. However, I could not set language in the first initialize time, as described in documentation it enters into the app.refresh loop.

  • I found that it can be fixed by third parameter of setLangData function without refreshing the view:
    this.app.getService("locale").setLangData(currentLang(), langObj, true);

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!