Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
EDC:
Download extensions for Elxis CMS
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Show full language name instead of ISO code in language switcher (FIVE template)
« previous
next »
Print
Pages: [
1
]
Author
Topic: Show full language name instead of ISO code in language switcher (FIVE template) (Read 4464 times)
seadhna
Hero Member
Posts: 507
Show full language name instead of ISO code in language switcher (FIVE template)
«
on:
October 18, 2020, 18:09:10 »
Hi, is it possible in the select-box of the language-switcher in the FIVE template, to display the full language names, instead of the 2-letter ISO code? e.g. English instead of EN?
Logged
michalis1984
Sr. Member
Posts: 334
Re: Show full language name instead of ISO code in language switcher (FIVE template)
«
Reply #1 on:
October 19, 2020, 12:36:11 »
Did you try to change the settings on the language module?
Logged
seadhna
Hero Member
Posts: 507
Re: Show full language name instead of ISO code in language switcher (FIVE template)
«
Reply #2 on:
October 20, 2020, 17:17:33 »
In the FIVE template, the language module is not required. There is a parameter in the Template settings: "Display language selection? Available only if 2 or more languages are published".
This is better because it allows switching languages on tag index pages.
Logged
michalis1984
Sr. Member
Posts: 334
Re: Show full language name instead of ISO code in language switcher (FIVE template)
«
Reply #3 on:
October 20, 2020, 18:30:44 »
Correct. It needs a change at template level at file five.class.php
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Show full language name instead of ISO code in language switcher (FIVE template)
«
Reply #4 on:
October 20, 2020, 21:56:57 »
Template Five uses an internal language selector and not the module. The template is designed to use the 2 letter language code in order to fit properly on the available space under all circumstances. I advise you not to change it.
However if you want to change here is how to do it.
Open file
templates/five/includes/five.class.php
Go to line
353
:
$block_lang .= '<option value="'.$lng.'"'.$selected.' data-act="'.$link.'">'.strtoupper($lng)."</option>\n";
And change it to:
$block_lang .= '<option value="'.$lng.'"'.$selected.' data-act="'.$link.'">'.$info['NAME']."</option>\n";
If you want to display the English language names instead of the native ones then instead of
$info['NAME']
use
$info['NAME_ENG']
«
Last Edit: October 20, 2020, 21:58:38 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 507
Re: Show full language name instead of ISO code in language switcher (FIVE template)
«
Reply #5 on:
October 22, 2020, 16:05:37 »
Thanks datahell!
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Show full language name instead of ISO code in language switcher (FIVE template)