Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Did you know that
Elxis 5.x
uses HTML5, CSS3 and pure javascript without external libraries such as jQuery?
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Company logo
« previous
next »
Print
Pages: [
1
]
Author
Topic: Company logo (Read 4596 times)
openita
Jr. Member
Posts: 68
Company logo
«
on:
February 17, 2014, 18:10:48 »
Hello!
Can you please tell me where I have to go to change the code that allows me to use a company logo differently depending on the language selected?
Thank you!
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Company logo
«
Reply #1 on:
February 17, 2014, 18:35:37 »
I don't know which is the "logo" you are taking about but I guess in your template. In this case the answer is obvious: In your template's
index.php
file.
The current language in Elxis 4.x can be retrieved like this:
$eLang = eFactory::getLang();
$lang = $eLang->currentLang(); //$lang = en, el, it, de, es, ru, etc....
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
openita
Jr. Member
Posts: 68
Re: Company logo
«
Reply #2 on:
February 17, 2014, 18:43:23 »
The logo appears here,
$this->tplparams['logo'] = trim($params->get('logo', 'templates/delta/images/logo.png'));
I wish that this will change according to the change of the language.
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Company logo
«
Reply #3 on:
February 17, 2014, 19:00:51 »
OK, so we talk about template
Delta
. Follow my instructions.
Open this file:
templates/delta/includes/delta.class.php
Go to line
56
$this->tplparams['logo'] = trim($params->get('logo', 'templates/delta/images/logo.png'));
Write below:
$lng = eFactory::getLang()->currentLang();
switch ($lng) {
case 'it': $this->tplparams['logo'] = 'templates/delta/images/logo_it.png'; break;
case 'de': $this->tplparams['logo'] = 'templates/delta/images/logo_de.png'; break;
case 'fr': $this->tplparams['logo'] = 'templates/delta/images/logo_fr.png'; break;
case 'ru': $this->tplparams['logo'] = 'templates/delta/images/logo_ru.png'; break;
default: break;
}
The languages I wrote are sample ones. You should write the ones you actually use. Note that you dont have to write a case for the default language, only for the secondary ones. Name your language related images as show above and place them into the "images" folder of template Delta.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
openita
Jr. Member
Posts: 68
Re: Company logo
«
Reply #4 on:
February 17, 2014, 19:41:17 »
thank you very much
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Company logo