News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Language Button / Dropdown

Started by Rusconipepparoni, March 30, 2010, 03:13:00 PM

Previous topic - Next topic

Rusconipepparoni

I'm wondering if it would be possible to add a language button? Basically I'd like to add an english flag and a swedish flag, clicking on any of these flags would change your profile(user) language to the one you clicked. What would be the best approach to this?

Edit:

I've just noticed this forum has a language dropdown, such as I'd like, either that or with buttons (flags)


Rusconipepparoni

Quote from: Arantor on March 30, 2010, 03:47:16 PM
http://custom.simplemachines.org/mods/index.php?action=search;basic_search=language+drop+down

Thanks. I've decided that I'd rather have the flags and I found that a hyper link with index.php?language=french-utf8 as adress actually changes your language. Would it be a stupid way to do it, or should it work just fine? I'm considering doing two flags with similiar adress for the matching language.

Arantor

It would work. I can't remember off hand if it's the best way to do it, but it would work.

Rusconipepparoni

#4
Quote from: Arantor on March 30, 2010, 04:01:58 PM
It would work. I can't remember off hand if it's the best way to do it, but it would work.

By using that method, it resets to the default language everytime i logout and log back in. Would it be possible to use updateMemberData($ID_MEMBER, array('lngfile' => '\'swedish-utf8\'')); to make it permanent or am I getting it wrong?

Arantor

Yes, that would make it permanent.

Rusconipepparoni


Advertisement: