Advertisement
Flag plus name of language?
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! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Flag plus name of language?
Is there a way to make the Language Chooser module display both the flag and the text of the language? Seems the options in the controls prohibit showing both...
-MaestroC
-MaestroC
Advertisement
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Mar 31, 2014 9:02 am
Re: Flag plus name of language?
Are u using Joomfish?
- infograf768
- Joomla! Master
- Posts: 19129
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Flag plus name of language?
You would have to use an override for the mod_languages layout.maestroc wrote:Is there a way to make the Language Chooser module display both the flag and the text of the language? Seems the options in the controls prohibit showing both...
-MaestroC
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! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: Flag plus name of language?
It was originally a J1.0 site using Joomfish and it had the text and flags there. Now I have manually moved everything over to J3.2.3 using the built in language capabilities but wanted to keep the flag+language text.Harout1981 wrote:Are u using Joomfish?
-
- Joomla! Apprentice
- Posts: 9
- Joined: Mon Mar 31, 2014 9:02 am
Re: Flag plus name of language?
I would suggest you continue using joomfish if you are used to it since the built in joomla language follows a bit different interface. I don't know about you but I have designed and maintained several websites and Joomfish is one of the most effective part of the process. Thanks
-
- Joomla! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: Flag plus name of language?
If I could have used it I would have done so as this whole migration has been a pain. The problem for me was getting from Joomla 1.0 all the way to 3.2.3. I couldn't find the files I needed to migrate to 1.5 and then up to 3.2.3. I decided at the time it would be better just to recreate the site in 3.2.3 by hand.
-
- Joomla! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: Flag plus name of language?
Any idea what an override might look like to do that? Flag + language name ?infograf768 wrote:You would have to use an override for the mod_languages layout.maestroc wrote:Is there a way to make the Language Chooser module display both the flag and the text of the language? Seems the options in the controls prohibit showing both...
-MaestroC
- infograf768
- Joomla! Master
- Posts: 19129
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Flag plus name of language?
Copy the file
ROOT/modules/mod_languages/tmpl/default.php
Place it in your template after creating the enclosing folders:
name_of_your_template/html/mod_languages/default.php
Edit the file with a text editor or using back-end "Template Manager: Customise Template"
Supposing you have chosen display Flags as parameter in the module, change
for example to
Will display
ROOT/modules/mod_languages/tmpl/default.php
Place it in your template after creating the enclosing folders:
name_of_your_template/html/mod_languages/default.php
Edit the file with a text editor or using back-end "Template Manager: Customise Template"
Supposing you have chosen display Flags as parameter in the module, change
Code: Select all
<?php if ($params->get('image', 1)):?>
<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true);?>
<?php else : ?>
Code: Select all
<?php if ($params->get('image', 1)):?>
<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true);?>
<?php echo $language->title_native . '<br>'; ?>
<?php else : ?>
You do not have the required permissions to view the files attached to this post.
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! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: Flag plus name of language?
Thank you so much for the help. That worked great! I pasted it in and it worked right away.
One last little customization though... On your example it does not show the abbreviations except for on (UK). On my system it is not like that. It is showing the abbreviation for all of the languages.
How do I remove the (UK) or (RU) from the end of the name of the languages? I am assuming it is in the $language->title_native part but is there a form of this that will just show the name of the language and not the abbreviation?
I thought I could turn them off in the settings for the module but turning off Languages Full Names still makes the abbreviation display next to the name. My settings now are:
Dropdown- No
Flags - Yes
Horizontal - Yes
Active Language- Yes
Language Full Names- No
One last little customization though... On your example it does not show the abbreviations except for on (UK). On my system it is not like that. It is showing the abbreviation for all of the languages.
How do I remove the (UK) or (RU) from the end of the name of the languages? I am assuming it is in the $language->title_native part but is there a form of this that will just show the name of the language and not the abbreviation?
I thought I could turn them off in the settings for the module but turning off Languages Full Names still makes the abbreviation display next to the name. My settings now are:
Dropdown- No
Flags - Yes
Horizontal - Yes
Active Language- Yes
Language Full Names- No
- infograf768
- Joomla! Master
- Posts: 19129
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Flag plus name of language?
Please attach a screenshot of the language switcher as it appears on your site.
The code above will display the NATIVE title as defined in the Content Languages.
It is easy to change these as you wish
See administrator/index.php?option=com_languages&view=languages
The code above will display the NATIVE title as defined in the Content Languages.
It is easy to change these as you wish
See administrator/index.php?option=com_languages&view=languages
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! Explorer
- Posts: 489
- Joined: Sun Dec 04, 2005 7:27 pm
- Contact:
Re: Flag plus name of language?
This was how it looked before I figured out what you were saying. I went in and changed the Native Title on each language to remove the (XX) and now it looks perfect. Thank you!infograf768 wrote:Please attach a screenshot of the language switcher as it appears on your site.

screengrab
Advertisement