Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1.8 Move all js language variables to cacheable js file
#1
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.
Reply
#2
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)