Customised flag icons

General questions regarding the use of languages in Joomla! 2.5.

Moderators: infograf768, 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.
Freemani
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jun 18, 2013 9:28 am
Location: Montpellier, France
Contact:

Customised flag icons

Postby Freemani » Tue Jun 18, 2013 9:42 am

Hi I have my multi language site up and running, but the flag icons provided don't really look right on my site.

Is there any way I can add my own flags to replace these as I would like them to match the social media icons I have in place just next door to the language switcher. (i.e. square and with some shading effects).

Thanks for any help. And sorry if this has been answered, I have searched but with no luck.

Chris

User avatar
AlphaDesign
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Fri Apr 14, 2006 3:12 pm
Location: France - Nîmes
Contact:

Re: Customised flag icons

Postby AlphaDesign » Tue Jun 18, 2013 10:29 am

Hi, the flags images are located in this folder /media/mod_languages/images/ you can replace them however keep the same name & extension as the original one
Alpha Design : Joomla Template Design & Development since 2005
alphadesign.fr/services/creation-de-sites-templates-joomla-responsives.html
alphadesign.fr

Freemani
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jun 18, 2013 9:28 am
Location: Montpellier, France
Contact:

Re: Customised flag icons

Postby Freemani » Tue Jun 18, 2013 11:52 am

As simple as that?

Thanks. Will they remain there when Joomla updates?

User avatar
AlphaDesign
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Fri Apr 14, 2006 3:12 pm
Location: France - Nîmes
Contact:

Re: Customised flag icons

Postby AlphaDesign » Tue Jun 18, 2013 12:03 pm

Freemani wrote:As simple as that?

Yes

Freemani wrote:Will they remain there when Joomla updates?
keep a copy of your modified flag images, as it might happen that a Joomla update change theses files, even if I don't think it is very likely
Alpha Design : Joomla Template Design & Development since 2005
alphadesign.fr/services/creation-de-sites-templates-joomla-responsives.html
alphadesign.fr

Freemani
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Jun 18, 2013 9:28 am
Location: Montpellier, France
Contact:

Re: Customised flag icons

Postby Freemani » Wed Jun 19, 2013 8:43 am

Thank you very much, works a treat.

User avatar
AlphaDesign
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Fri Apr 14, 2006 3:12 pm
Location: France - Nîmes
Contact:

Re: Customised flag icons

Postby AlphaDesign » Wed Jun 19, 2013 8:51 am

no worries :)
Alpha Design : Joomla Template Design & Development since 2005
alphadesign.fr/services/creation-de-sites-templates-joomla-responsives.html
alphadesign.fr

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18613
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Customised flag icons

Postby infograf768 » Sun Jun 30, 2013 3:37 pm

It is advised to keep all the default .gif images as they are anyway used in back-end.
If you create new images, use the same prefix and save them as jpg or png.

Then make a template override for the mod_languages module in the html folder of your template where the only change will be the suffix of the image.
I.e. change

Code: Select all

<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true);?>


to

Code: Select all

<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.png', $language->title_native, array('title' => $language->title_native), true);?>


Instruction shere:
http://docs.joomla.org/Understanding_Ou ... _Overrides
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
AlphaDesign
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Fri Apr 14, 2006 3:12 pm
Location: France - Nîmes
Contact:

Re: Customised flag icons

Postby AlphaDesign » Tue Feb 18, 2014 10:21 am

infograf768 wrote:It is advised to keep all the default .gif images as they are anyway used in back-end.

Infograph is right the override solution is the proper solution
Alpha Design : Joomla Template Design & Development since 2005
alphadesign.fr/services/creation-de-sites-templates-joomla-responsives.html
alphadesign.fr

joomleb
Joomla! Guru
Joomla! Guru
Posts: 957
Joined: Sat Aug 20, 2005 8:53 am
Location: Panamá

Re: Customised flag icons

Postby joomleb » Mon Dec 26, 2016 6:00 am

infograf768 wrote:It is advised to keep all the default .gif images as they are anyway used in back-end.
If you create new images, use the same prefix and save them as jpg or png.

Then make a template override for the mod_languages module in the html folder of your template where the only change will be the suffix of the image.
I.e. change

Code: Select all

<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true);?>


to

Code: Select all

<?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.png', $language->title_native, array('title' => $language->title_native), true);?>


Instruction shere:
http://docs.joomla.org/Understanding_Ou ... _Overrides


Hi Infograf768,
Please, your june 2013 suggestion is still valid, insn't it?

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18613
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Customised flag icons

Postby infograf768 » Mon Dec 26, 2016 3:54 pm

Suggestion is the same.
Beware though as the mod_languages template has changed a bit and $language->image . '.gif' can be found in 3 places.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

joomleb
Joomla! Guru
Joomla! Guru
Posts: 957
Joined: Sat Aug 20, 2005 8:53 am
Location: Panamá

Re: Customised flag icons

Postby joomleb » Mon Dec 26, 2016 11:13 pm

@Infograf768
thank you very much for support!


Return to “Language - Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 3 guests