Customizing the switch language block
Permalink 1 user found helpful
Hi!
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!
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!
I ran into the same problem.
Up to now through reading the code I could find out, that one can create an
images/flags
Apart from that I still have problems setting the
Thanks,
Marco