Customizing the switch language block

Permalink 1 user found helpful

I ran into some trouble customizing the switch language block.

I want to use my custom flags. After some frustration, I have overwritten the default images in the flags folder, and after much searching I found the IMAGE SIZE variable to make them bigger. However it messed up the dashboard, because it uses the larger flags everywhere. How could I solve this problem? Ideally I'd like to create a custom template that adds a prefix for my custom flag images, so they wouldn't change elsewhere, only on the page template. But I cannot do that, because the custom templates are referencing a different file, that controls the flag display, and that file references a third file, etc. Making it very hard to understand thewhole mess. Not to mention I don't want to overwrite any file in the package folder, because then I can't update the add-on.

The second important change is the alt link text. Right now it doesn't say anything (by using any of the supplied flag display template). Ideally it should be the page title, or at least the language name. It's important for accessibility, (and therefore I guess SEO).

Is there a cleaner template that's easier to understand and customize, or am I doomed to hours of frustration?

Thank you for your help!

View Replies:
Marco5 replied on at Permalink Reply

I ran into the same problem.
Up to now through reading the code I could find out, that one can create an
folder directly under the C5 installation directory where flags images can be overridden. So the update problem should be solved. Although I find it rather unintuitive that it does not depend on the currently set theme of the page. IMO the flag images should rather reside in

Apart from that I still have problems setting the
constants. I try to do that in my theme code, but it does not get respected. I would appreciate any help on that.

Marco5 replied on at Permalink Reply
Ok, if anybody is interested: For now I just overwrote the CSS to make it work.
.ccm-region-flag {