Language flags not showing
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Language flags not showing
Hi, i have both the language switcher plugin and module set to enabled, yet the language switcher flags don't appear in my top menu.
My website url:
https://verticalife.it/it
We used to have the flags enabled then a colleague disabled them, so i doubt it has to do with menu items and such, because we do have multiple languages installed and a default page for each one. I'll pm user data if requested for help.
Looking forward to your reply, best regards
My website url:
https://verticalife.it/it
We used to have the flags enabled then a colleague disabled them, so i doubt it has to do with menu items and such, because we do have multiple languages installed and a default page for each one. I'll pm user data if requested for help.
Looking forward to your reply, best regards
- mjparadac
- Joomla! Hero
- Posts: 2488
- Joined: Mon Oct 29, 2012 3:58 pm
Re: Language flags not showing
Hello a0394
Are you using an extension to display the flags?
Regards,
Are you using an extension to display the flags?
Regards,
Joomla Community Ambassador for A2 Hosting | A2 Hosting - Our speed, your success | https://www.a2hosting.com/joomla-hosting
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
Are you sure the language switcher module is enabled and set to an existing position in your template?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
Hi, thanks for your replies! In the meantime i fidgeted some and finally made it.
Now i have another big question: we have 3 languages installed on our website, it-it, en-gb and en-us. However, the en-us language is being used for the USA branch of our brand, which has a different template and other changes. Is it possible to show only two of the languages' flags (it-it and en-gb)?
Looking forward to your reply, have a nice day!
Now i have another big question: we have 3 languages installed on our website, it-it, en-gb and en-us. However, the en-us language is being used for the USA branch of our brand, which has a different template and other changes. Is it possible to show only two of the languages' flags (it-it and en-gb)?
Looking forward to your reply, have a nice day!
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
remove if not proper, but "up" lol
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
Still can't find any switcher on your site.In the meantime i fidgeted some and finally made it.
You mean you do not want people to be able to switch to en-us?Is it possible to show only two of the languages' flags (it-it and en-gb)?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
I've enabled it only on this test page i'm working on:
https://verticalife.it/it/contatti-new
what i want to achieve is showing only the it-it and en-gb switches, thus hiding the en-us (which leads to our USA branch, which uses a different template)
https://verticalife.it/it/contatti-new
what i want to achieve is showing only the it-it and en-gb switches, thus hiding the en-us (which leads to our USA branch, which uses a different template)
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
That is easy.
Create an override for mod_languages and add $language->lang_code !== 'en-US' in the conditional.
In your case, as you use the list type I guess it would be line 75
or, if you display the active language line 89
Create an override for mod_languages and add $language->lang_code !== 'en-US' in the conditional.
In your case, as you use the list type I guess it would be line 75
Code: Select all
<?php if (!$language->active && $language->lang_code !== 'en-US') : ?>
Code: Select all
<?php elseif ($params->get('show_active', 1) && $language->lang_code !== 'en-US') : ?>
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
Hi infograf768, thanks for your reply!
However, i'm not sure i got what you mean lol
Do you mean this: templates/MYTEMPLATE/html/mod_languages/default.php ?
And if there's no such line with that content, do i have to add it?
However, i'm not sure i got what you mean lol
Do you mean this: templates/MYTEMPLATE/html/mod_languages/default.php ?
And if there's no such line with that content, do i have to add it?
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
Code: Select all
Do you mean this: templates/MYTEMPLATE/html/mod_languages/default.php ?
Code: Select all
And if there's no such line with that content, do i have to add it?
Look at the lines I indicated and modify as suggested.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
Hi, yes i copied that file from the core to mytemplate/html/mod_languages(had to create the folder as well).
Yet i can't find any line like "<?php if (!$language->active && $language->lang_code !== 'en-US') : ?>" in it...
Yet i can't find any line like "<?php if (!$language->active && $language->lang_code !== 'en-US') : ?>" in it...
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
As I explained, you have to ADD the code $language->lang_code !== 'en-US' in the conditional
We have
Change to
We have
Code: Select all
<?php if (!$language->active) : ?>
Code: Select all
<?php if (!$language->active && $language->lang_code !== 'en-US') : ?>
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
Ok i have changed line 75 according to your posts with "<?php if (!$language->active && $language->lang_code !== 'en-US') : ?>", but unfortunately the en-US flag is still there: https://verticalife.it/it/contatti-new
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
That is because it may not be that precise setting you use...
It could be the other line (89) as I already said above...
It could be the other line (89) as I already said above...
Code: Select all
<?php elseif ($params->get('show_active', 1) && $language->lang_code !== 'en-US') : ?>
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Apprentice
- Posts: 29
- Joined: Sat Jun 22, 2019 12:34 pm
Re: Language flags not showing
I also changed line 89 to
but to no avail...
Code: Select all
<?php elseif ($params->get('show_active', 1) && $language->lang_code !== 'en-US') : ?>
but to no avail...
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Language flags not showing
Can't help anymore without superuser access to your backend.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group