Welcome to Geeklog, Anonymous Wednesday, March 19 2025 @ 04:49 am EDT
Geeklog Forums
Change Language in Blocks/Plugin
Nicholas
Anonymous

Hi,
Gooday! Need some advice. Has anyone successfully created a bilingual or multilingual site (only one database) where we can switch between languages for both the Block labels and Plugin labels (like menu plugin).
The language files took care of standard geeklog labels but I've been struggling with trying to find out how I can make my site bilingual (using UTF8) with the block and plugin labels.
I notice there are a few geeklog experts who have doen bilingual sites in Eng/Jap & Eng/Chinese.
Any suggestions/advice is greatly appreciated.
Nicholas
Gooday! Need some advice. Has anyone successfully created a bilingual or multilingual site (only one database) where we can switch between languages for both the Block labels and Plugin labels (like menu plugin).
The language files took care of standard geeklog labels but I've been struggling with trying to find out how I can make my site bilingual (using UTF8) with the block and plugin labels.
I notice there are a few geeklog experts who have doen bilingual sites in Eng/Jap & Eng/Chinese.
Any suggestions/advice is greatly appreciated.
Nicholas
15
13
Quote
Status: offline
Blaine
Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
Which plugins are you referring to. The problem generally is that the "name" used for the menuitem has been hardcoded in the plugin function as upposed to using a variable.
Example the forum function which is used to display the header menu item.
Earlier versions were like:
function plugin_getmenuitems_forum() {
global $_TABLES,$_CONF,$LANG_GF00;
$menuitems['Forum' = "$_CONF[site_url]/forum/index.php";
return $menuitems;
}
Now using a LANGUAGE File defined variable.
function plugin_getmenuitems_forum() {
global $_TABLES,$_CONF,$LANG_GF00;
$menuitems["$LANG_GF00[pluginlabel]"] = "$_CONF[site_url]/forum/index.php";
return $menuitems;
}
Note: I've removed some code to simplify the examples.
Geeklog components by PortalParts -- www.portalparts.com
Example the forum function which is used to display the header menu item.
Earlier versions were like:
Text Formatted Code
function plugin_getmenuitems_forum() {
global $_TABLES,$_CONF,$LANG_GF00;
$menuitems['Forum' = "$_CONF[site_url]/forum/index.php";
return $menuitems;
}
Now using a LANGUAGE File defined variable.
Text Formatted Code
function plugin_getmenuitems_forum() {
global $_TABLES,$_CONF,$LANG_GF00;
$menuitems["$LANG_GF00[pluginlabel]"] = "$_CONF[site_url]/forum/index.php";
return $menuitems;
}
Note: I've removed some code to simplify the examples.
Geeklog components by PortalParts -- www.portalparts.com
14
13
Quote
Nicholas
Anonymous
Thanks,
I was refering to
1) the menu plugin 1.61 that I installed and the menu labels that I created from the menu editor
2) the block titles that I create from the block editors for block that didn't come pre-packaged with GL install pack
Pardon me if I'm missing something here I should know.
Nicholas
I was refering to
1) the menu plugin 1.61 that I installed and the menu labels that I created from the menu editor
2) the block titles that I create from the block editors for block that didn't come pre-packaged with GL install pack
Pardon me if I'm missing something here I should know.
Nicholas
16
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Nicholas: 2) the block titles that I create from the block editors for block that didn't come pre-packaged with GL install pack
Those block titles are stored in the database, so they can't really change when you switch languages.
bye, Dirk
17
14
Quote
All times are EDT. The time is now 04:49 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content