News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Language in lightbox

Started by HerKle, 26.09.2018 22:41:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HerKle

Hi,
the "Press x to close" text is only in English. In order to adapt it to the site language, there are 3 things to do:


  • Create a language key in language override, eg. COM_JDOWNLOADS_PRESS_X_TO_CLOSE and give it its value in each language you need. Don't forget to enter the English version as well!
  • Enter the following code into the headers of those files in components' view directories which use the lightbox:

JText::script('COM_JDOWNLOADS_PRESS_X_TO_CLOSE');
  • Replace in the file components/com_jdownloads/assets/lightbox/lightbox.js the line 398
objKeyboardMsg.innerHTML = 'Press <kbd>x</kbd> to close.';by this line:objKeyboardMsg.innerHTML = Joomla.JText._("COM_JDOWNLOADS_PRESS_X_TO_CLOSE") ; I recommend to integrate this into future jd versions.
Regards, Herbert
Kind regards, Herbert
  •