?
avatar infograf768
infograf768
4 Jun 2017

Steps to reproduce the issue

Install Persian language.
It contains, correctly, in administrator/language/fa-IR/
the file fa-IR.css.

This file is designed to override some default template css to adapt to a specific language.
In Isis and Hathor, it should be loaded by

// Load specific language related CSS
JHtml::_('stylesheet', 'language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto', 'relative' => true));

Expected result

css loads.

Actual result

It does not.

avatar infograf768 infograf768 - open - 4 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jun 2017
avatar infograf768
infograf768 - comment - 4 Jun 2017

Evidently, if I use the 2.5 code

$file = 'language/'. $lang->getTag() . '/' . $lang->getTag() . '.css';
if (JFile::exists($file)) {
	JFactory::getDocument()->addStyleSheet($file);
}

it loads OK

avatar C-Lodder
C-Lodder - comment - 4 Jun 2017

Try removing 'relative' => true from the array

avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Jun 2017
JHtml::_('stylesheet', ltrim(JUri::base(true), '/') . '/language/' . $lang->getTag() . '/' . $lang->getTag() . '.css', array('version' => 'auto'));

should work

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jun 2017
Category com_languages
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Jun 2017
Status New Discussion
avatar andrepereiradasilva
andrepereiradasilva - comment - 4 Jun 2017
avatar mbabker
mbabker - comment - 4 Jun 2017

See PR.

avatar mbabker mbabker - change - 4 Jun 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-06-04 12:09:02
Closed_By mbabker
avatar mbabker mbabker - close - 4 Jun 2017

Add a Comment

Login with GitHub to post a comment