MyBB Community Forums

Full Version: Move all js language variables to cacheable js file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there an easy way to use files insead of in-page variables for js?
Now, every page have 3kb of variables that user have to download on every page, though they are never changed. Not a big deal, but still, they should be included as a file wich can be cached, saving sweat kbs. Especially for non-english languages.

variables like this
Quote:lang.select2_match = "Доступен один результат, нажмите воод для его выбора";
lang.select2_matches = "Доступно {1} результатов, используйте стрелки вверх вних для навигации.";
lang.select2_nomatches = "Совпадений не найдено";
lang.select2_inputtooshort_single = "Пожалуста,  введите один или более символов";
lang.select2_inputtooshort_plural = "Пожалуста,  введите  {1} или более символов";

May be there is easy way for this, without creating my own system or plugin.
It's not possible at the minute, as users can set their own languages, so there's have to be a new JS file generated for every installed language. This may happen for 2.0, but it's not available in 1.x at the minute.