Language Button Menu

Started by navarretemarce, October 01, 2010, 12:18:54 PM

Previous topic - Next topic

navarretemarce

Link to Mod

This mod places a Language Menu on your Site.

Features:
- Easy styling and customization trough css.
- Customizable language labels
- Three different menu templates:
  - Button Menu
  - From Menu
  - Flag Icon Menu

- The mod uses now integration hooks, therefore no changes are performed in the SMF source code.

Requierments:
- You need to have installed SMF language packs (utf8 if possible).
- Go to admin panel>language>settings and ensure that "user-selectable language support" is Enabled.   

Styling:
A sample styling is included with the installation.
There is one mayor division to wrap the buttons id = "language_button_menu"
The selected language is a dissabled button with the class="active".
You can easly change the style of the buttons, to fit your theme, edditing the sample .css that is added at the end
of the css/index.css file.

Demo site: http://iluminandoclasicas.com.ar

January 2011 Version 2.1 Released
November 2012 Version 3.0 Released

New features:
* Allows selection between 3 different templates: Button Menu, Drop Menu and Flag Icon Menu.
* Customizable flag icon size.
* Customizable, labels for each language.
* Can be activated or deactivated without need of uninstalling the mod.

Sabre™

Looks nice.
Keep up the good work :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


aedlion

Hi,
How do you replace text with country flags?

-=[Vyorel]=-

My mods for SMF - [6].

Masterd


Moodx

Hi, I have this mod installed on 2.0rc4 and it world perfect but I would realy like to know how to change those buttons to images!
Someone can advise in this?

navarretemarce

Sorry for the delay. You can change it by .css styling. If you don´t know how to use css. I can give you a sample code :).
Thanks for your comments.

JoeB

Very nice mod
Thanks a LOT
Keep the good work

impreza

Great addition - I tested it, I greet and thank
Portal ToTemat.pl - treści w postaci artykułów i filmów tematycznych.

henrik1782

Hi...

Tried to install on SMF 2.0 RC4 and got an error with the ./Sources/Admin.php

Cant find the text in admin.php that the mod are searching for.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

navarretemarce

#10
Thanks Henrik,

Do you experience this problem with version 2.01?
Sorry I cannot reproduce this error, perhaps you have other mod that unfortunatly modified your admin.php. Which mods do you have installed? 

henrik1782

Hi...

Yes it is version 2.1 and I have several other mods.

But normally mods wont remove a line like

// Note the comma!! The setting with automatically appear with the first mod to be added.

But it can of cause have been another mod that have remove this line
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

navarretemarce

#12
Hi,

Not necessarily the line was removed, perhaps a simple change in tabs or returns can generate difficulties for the phraser to find the line.
You may like to try modifying the admin.php file manually. Let me know if work. 

henrik1782

Ok...

It seems that Enotify changed that line. Changed it back and everything went ok.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

navarretemarce

#14
Those are good news :). Could be, Enotify replaces the line instead of adding it at the end.

OCJ

Great to have this and I really think it shouldn't have to be a  mod ... as languages are automatically installed in SMF2, there should be a standard way of adding them to a language tab perhaps on the menu.  Lots of visitors need their language on the board and it isnt always set for their language on browsers depending on location and OS setting.


My basic request here is - can you give some examples for adding the mod to different places? This only works on the core themes and almost every custom theme I've tested (lots of nice ones) fail to install it (header).

I would really like to use other themes but need the language selector, and it wont install on them.

My ideal location is the menu bar ... Im hoping this way it would install on any theme as they generally follow the default menu layout.
I can see for a lot of languages it would be a mess, but 1 or 2 extra ones ok. If  there were a 'Languages' tab on the main menu with each one as a sub menu - perfect!

Andy

navarretemarce

Hi Andy,

For the menu bar could be quite complicated. Otherwise you can put the menu wherever you want in your themes adding this line:
show_language_menu()

A sample code may be (take care with the echoes or your theme may be messed up)

echo'
<div id="a division where you want to show the language menu">';
show_language_menu();
echo'
</div>';

henrik1782

The flags are very limited... can you advice where to get missing flag icons?
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

navarretemarce

Hi Hernik,

Thank for pointing it out. You can use the flag icons you want as far they have the .png extension. The mod will format the images to keep them homogeneous.
You can download free flag icons for example from this site: http://www.freeiconsdownload.com.
For get the icons working follow this steps:

1.- Get your desired icon in png format.

2.- Rename the icon file. In order to be recognized the flag should have the same name as the language package for example:
"german-utf8.png"

3.- Upload the file into the packages folder /flagicons 


henrik1782

Hi navarretemarce...

Thanks... works fine.
My favorite mods: Forum Firewall, httBL, MessagePreviewOnHover, BoardHover Mod, VB Style Board Index, Separate Replies and Views Column, Realtime clock by Joker, ENotify, Topic Solved.

Advertisement: