You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a common use case, which is tinymce starting with another language than english.
As you all know, tinymce allows us to set a language and a language_url in order to set it up.
My idea comes from the need of having a couple of configurations at website level that do not initialize any textareas at first.
These configurations must have already language packs setup, but I don't want to maintain server side code to write the language setup into those configs, whether by setting an url to a server side script that prints the lang file or echoing the lang file inline.
Currently, in my testing setup, I have an object like this:
This works as it intended, with 3 types of configuration preset in my object.
In order to set the language dynamically at runtime, i'll have to either use server side code to do it, or, in JS, add the language pack manually and change the configuration variable as needed.
Now, in another part of my setup, I have another JS file, that has a multiple JS library ( bootstrap-select, datatables, etc ) localization file. This is only 1 file that contains several variables related to each library. This is intented as to keep files to a minimum.
I would like to be able to setup my editors with the variable stored in that file and save a couple of network requests.
I would like to hear your thoughts and solutions if you have them :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello there.
I have a common use case, which is tinymce starting with another language than english.
As you all know, tinymce allows us to set a language and a language_url in order to set it up.
My idea comes from the need of having a couple of configurations at website level that do not initialize any textareas at first.
These configurations must have already language packs setup, but I don't want to maintain server side code to write the language setup into those configs, whether by setting an url to a server side script that prints the lang file or echoing the lang file inline.
Currently, in my testing setup, I have an object like this:
And I would call it:
This works as it intended, with 3 types of configuration preset in my object.
In order to set the language dynamically at runtime, i'll have to either use server side code to do it, or, in JS, add the language pack manually and change the configuration variable as needed.
Now, in another part of my setup, I have another JS file, that has a multiple JS library ( bootstrap-select, datatables, etc ) localization file. This is only 1 file that contains several variables related to each library. This is intented as to keep files to a minimum.
I would like to be able to setup my editors with the variable stored in that file and save a couple of network requests.
I would like to hear your thoughts and solutions if you have them :)
Best regards
Beta Was this translation helpful? Give feedback.
All reactions