Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 05:48 pm EDT

Geeklog Forums

Change Language in Blocks/Plugin


Nicholas

Anonymous
blank
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

 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:
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
 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
 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
 Quote

All times are EDT. The time is now 05:48 pm.

  • 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