I would like to change the style of my language switch block but I am not satisfied with the standard options of the internationalization add-on.
Instead of having a select-button or the flags provided in the custom templates I would like to have just clean text like «English» or «French» or «EN» …
Has anyone already done such a custom template for this block that he would like to share or has anyone an easy solution for this?
I've managed to create two custom templates that outputs something like "english français" and "en fr" respectively. Not sure it it's the best way (I'm no php programmer), but it works for me. Here's how you can add it too:
1. download and extract the attached file (see attachement to this comment). It contains switch_language/templates/text and text_short. These are the custom templates.
2. Put the folder "switch_language" in yoursiteroot/blocks (or, if it exists, just copy the template folders) - see you'll have ROOT/blocks/switch_language/templates/text and text_short
3. In you block's context menu, choose Custom template - choose Text or Text short
4. Test.
5. Now add css to your stylesheet (for example floating the list items and links to make it horizontal, add text-transform:uppercase to links, etc).
- Custom template "Text" will result in something like "english français"
- Custom template "Text short" will result in something like "en fr"
- It will result in the following html structure (and classes):
It shows how to change the apperance of the language block. In the end there are only two designs available from the start (which don't match my design ideas eather).
I don't have the solution so far, but I believe it should be possible somehow to create your own custom block skins.
Hi Karl. I already posted two custom templates - see my comment above. I put it in /blocks instead of /packages - not sure what the best choice is here. (your attachement file seems to be empty by the way)
Code
Post Reply
Delete Post
You are allowed to delete your post for 5 minutes after it's posted.