M
M
Mikhail Enikeev2016-08-20 23:29:52
Joomla
Mikhail Enikeev, 2016-08-20 23:29:52

How to display a description through the admin panel for a multilingual joomla site?

Good day to all! tell me how to fix the problem!
I created the parameter
field name="site_copyright" type="input" label="TPL_BOOTSTRAP_COPYRIGHT" description="TPL_BOOTSTRAP_COPYRIGHT_DESC" in the templateDetails.xml file.
Through the template manager, it became possible to write my own copyright on the site ;
I display this copyright through the code
<?php echo $ site_copyright ?>
but the fact is that when you switch the site content language, for example, to English, this copyright is displayed in Russian. The question is how can I make sure that when changing the language, the copyright changes to English. How to give this $site_copyright variable its own language value for different languages!?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Goryachev, 2016-08-21
@webirus

Maybe something like that. Try it.

<?php
$lang = $this->language;
switch ($lang) {
case "ru-ru":
echo $site_сopyright_ru;
break;
case "en-en":
echo $site_сopyright_en;
break;
}
?>

Accordingly, both fields must be created in the template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question