Change Flag Icon in Language Module

General questions regarding the use of languages in Joomla! 4.x.

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.
Post Reply
Dr B
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 06, 2023 7:02 pm

Change Flag Icon in Language Module

Post by Dr B » Mon Nov 06, 2023 7:19 pm

I can not seem to find the folder that will allow me to change the icon for Spanish language flag to Mexico flag.
Pls help. Dr B

User avatar
Cnossos
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Mar 16, 2022 7:25 am
Contact:

Re: Change Flag Icon in Language Module

Post by Cnossos » Tue Nov 07, 2023 6:32 am

You may want to have a look at this thread: viewtopic.php?t=814764

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2777
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Change Flag Icon in Language Module

Post by SharkyKZ » Tue Nov 07, 2023 7:20 am

There are two ways:

1. Create a template-level override. To do that, place es.gif in these folders, depending on the template. You need to do this for all templates used on your site.
administrator/templates/[template]/images/mod_languages (backend template)
templates/[template]/images/mod_languages (frontend template)
media/templates/[client]/[template]/images/mod_languages ("inheritable" template)

2. Place a gif icon in media/mod_languages/images and select it in the content language form. This will apply globally.

Dr B
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 06, 2023 7:02 pm

Re: Change Flag Icon in Language Module

Post by Dr B » Sun Nov 19, 2023 3:54 pm

As I read the answers from my Joomla friends, I find myself really at the Fledgling level. I tried to understand SharkyKZ and realized I am quite unaware of what he asks me to do. I tried an override in the template html/mod_language/default.php where five .gif instances occur. I chose the 3rd one since it is 3rd in line with my drop down menu on front end. There are five language flags I'm using and although the Spain flag is nice, my real audience is Mexico, so I just want to replace the flags. What should I be doing to accomplish that task? All replies are welcomed along with code examples where necessary. Thanks in advance.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30487
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Change Flag Icon in Language Module

Post by Per Yngve Berg » Sun Nov 19, 2023 5:37 pm

Mod. Note: Relocated the topic to the Language Forum.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30487
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Change Flag Icon in Language Module

Post by Per Yngve Berg » Sun Nov 19, 2023 5:41 pm


User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1417
Joined: Tue Jun 30, 2020 12:17 pm

Re: Change Flag Icon in Language Module

Post by Pavel-ww » Mon Nov 20, 2023 7:51 am

Dr B wrote:
Sun Nov 19, 2023 3:54 pm
I tried to understand SharkyKZ and realized I am quite unaware of what he asks me to do.
Hi. This it too complicated :)

If you are not fundamentally so that the flag of Mexico will be in the admin panel, but it will be only on the frontend, then through CSS this is much easier to do. Prepare the image of the flag, the same size as all other flags. Upload it into the images folder of your site and provide a link to the image and to the page.
Last edited by Pavel-ww on Mon Nov 20, 2023 7:57 am, edited 1 time in total.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2777
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Change Flag Icon in Language Module

Post by SharkyKZ » Mon Nov 20, 2023 7:56 am

Dr B wrote:
Sun Nov 19, 2023 3:54 pm
As I read the answers from my Joomla friends, I find myself really at the Fledgling level. I tried to understand SharkyKZ and realized I am quite unaware of what he asks me to do. I tried an override in the template html/mod_language/default.php where five .gif instances occur. I chose the 3rd one since it is 3rd in line with my drop down menu on front end. There are five language flags I'm using and although the Spain flag is nice, my real audience is Mexico, so I just want to replace the flags. What should I be doing to accomplish that task? All replies are welcomed along with code examples where necessary. Thanks in advance.
You don't need to touch any layouts. Only upload the gif to specified locations. If using second approach, also select the gif in the content language form https://help.joomla.org/proxy?keyref=He ... ge&lang=en.


Post Reply

Return to “Language - Joomla! 4.x”