Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Switch language menu for all users
Hello,
Is there’s a way to simply add the list_language menu for everyone : then all users can choose there admin language interface ?
The problem with a plugin and a new extention tab is that only 1 and 2 privileges can see the extention tab.
thanks.
Last edited by fpradignac (2007-12-12 20:42:30)
françois
Offline
Re: Switch language menu for all users
what list_language menu do you mean… the one in the advanced preferences?
Offline
Re: Switch language menu for all users
Yes, the drop down menu that let you choose the “Currently active language” : admin >> preference >> language.
françois
Offline
Re: Switch language menu for all users
Yes, the drop down menu that let you choose the “Currently active language” : admin >> preference >> language.
Actually, it will change the whole site’s language, including the public txp-tags that use pre-made texts, not only the admin side.
Cheers!
Offline
#5 2007-11-29 03:08:58
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Switch language menu for all users
fpradignac
Check out the MLP Pack, it allows you to do this already. However, it’s overkill if all you want is an admin-side language switcher.
— Steve
Offline
Re: Switch language menu for all users
Gocom
Actually, it will change the whole site’s language, including the public txp-tags that use pre-made texts, not only the admin side.
Yes… that’s what I need ;-)
net-carver
However, it’s overkill if all you want is an admin-side language switcher.
Yes, it’s my problem : MLP is a bit heavy for my need.
I’ll try to “extract” the little part of MLP that do the switch and creat a plugin .. if I’m able to do so.
Last edited by fpradignac (2007-11-29 05:51:57)
françois
Offline
Re: Switch language menu for all users
Instead of trying to find what little piece of MLP does the language switching, you’re probably better of writing a plugin from scratch. Most of the work is in the user-interface (allowing the user to switch admin language), not in actually switching the language. Instead of using the extensions tab, I’d go for the admin -> users tab and add an option there using javascript.
Offline
#8 2007-11-29 09:23:55
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Switch language menu for all users
Ruud
You beat me to the post!
fpradignac
The MLP Pack switcher separates the public and admin switching, making them both switch on a per-user basis. That’s great for bigger ML sites where you not only have visitors using several languages but potentially many admin users (copywriters/editors — those who do the actual translating) who, on an individual basis, might want to select to work with the TxP admin interface in their own language.
If you don’t need that per-user-admin-language selection feature then Ruud is right: don’t bother cutting from the MLP code — all it eventually does is call the TxP function load_lang
anyway.
— Steve
Offline
Re: Switch language menu for all users
Many thanks Steve and Ruud,
I’ll try to work on your suggestions.
françois
Offline
Re: Switch language menu for all users
I can’t find the way to call a TXP function in my admin side plugin :-(
Call to undefined function: … : is there a “rule” to re-use a function from txp_prefs.php for example ?
Last edited by fpradignac (2007-12-08 00:00:22)
françois
Offline
Re: Switch language menu for all users
What TXP function?
Offline
Re: Switch language menu for all users
… sorry : function languages($name, $val) in txp_prefs.php
françois
Offline