|
Language support for plugin settings
|
|
08-16-2008, 12:05 PM
(This post was last modified: 08-16-2008 12:14 PM by Jan.)
Post: #1
|
|||
|
|||
|
Language support for plugin settings
Hello,
is there a possibility so provide language support for own plugins? Something like this should work: PHP Code: $lang->load("plugins/bdnames");Could something like this work: PHP Code: $bdnames_setting_1 = array(Support for Plugins only at www.mybboard.de or www.mybbcoder.info [jabber]janmalte@ubuntu-jabber.de[/jabber] |
|||
|
08-16-2008, 01:21 PM
(This post was last modified: 08-16-2008 01:23 PM by Yumi.)
Post: #2
|
|||
|
|||
|
RE: Language support for plugin settings
You could do something like that:
PHP Code: function my_activate()Or you can use the fact that MyBB searches for language variables (setting group langvars should be named setting_group_{$name} and setting titles are named setting_{$name} whilst descriptions are setting_{$name}_desc) Who is Yumi? It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
|
|||
|
08-16-2008, 02:53 PM
Post: #3
|
|||
|
|||
|
RE: Language support for plugin settings
Yes, this is what i did.
But then the placeholder for the language will be replaced on activation. All admins will see the settings in the same language and not in their own language. But this is what i wanna have Support for Plugins only at www.mybboard.de or www.mybbcoder.info [jabber]janmalte@ubuntu-jabber.de[/jabber] |
|||
|
08-17-2008, 07:01 AM
Post: #4
|
|||
|
|||
|
RE: Language support for plugin settings
Then use the second solution I gave...
You could add a plugin hook to load the necessary langvars for the settings page if you want to have it in an external .lang.php file. Who is Yumi? It's still the KFC crazed person who can't spell names properly with annoying AlTeRnAtInG CaPiTaLs in the NaMe
|
|||
|
08-19-2008, 11:52 PM
Post: #5
|
|||
|
|||
|
RE: Language support for plugin settings
The settings that plugins add should be translatable in the same way that default settings are translated.
PHP Code: $l['setting_group_<name>'] = "Setting group name";As Zinga said, you can have a plugin hook to load your plugin's language file in the settings manager. |
|||
|
« Next Oldest | Next Newest »
|
Search
Member List
Calendar
Help





