Welcome to Geeklog, Anonymous Friday, January 10 2025 @ 12:40 pm EST
Geeklog Forums
custom menu entries (mulitlanguage)
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Not sure I understand the question. When you switch languages, the menu links already change language, too.
For everything else, see How do I change the menu?
bye, Dirk
For everything else, see How do I change the menu?
bye, Dirk
10
8
Quote
Status: offline
suvi
Forum User
Chatty
Registered: 11/20/05
Posts: 44
Location:Zurich
Thanks. That was what I was looking for:
It is also possible to add your own entries to that list through the use of the 'custom' keyword and a function called CUSTOM_menuEntries that you'll have to implement in your lib-custom.php. It should return an array of (menu text, link) entries (see lib-custom.php for details).
I have to check if it works bilingual.
It is also possible to add your own entries to that list through the use of the 'custom' keyword and a function called CUSTOM_menuEntries that you'll have to implement in your lib-custom.php. It should return an array of (menu text, link) entries (see lib-custom.php for details).
I have to check if it works bilingual.
10
10
Quote
Status: offline
suvi
Forum User
Chatty
Registered: 11/20/05
Posts: 44
Location:Zurich
This works with one custom entry like
'home', 'custom', 'search',
This is how I made it bilanguage:
/**
* This is an example of a function that returns menu entries to be used for
* the 'custom' entry in $_CONF['menu_elements'] (see config.php).
*
*/
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER, $_COOKIE;
$myentries = array ();
if ( !empty ($_USER['language'])) {
$lang = $_USER['language'];
} elseif ( !empty ($_COOKIE['language'])) {
$lang = $_COOKIE['language'];
} else {
$lang = $_language_default;
}
if ( strtolower($lang) == "english_utf-8" ) {
$lang = 'en';
$myentries[] = array('url'=> $_CONF['site_url'].'/staticpages/index.php?page=products_en',
'label' => 'Products & Solutions');
} else {
$lang = 'de';
$myentries[] = array('url'=> $_CONF['site_url'].'/staticpages/index.php?page=products_de',
'label' => 'Produkte & Lösungen');
}
return $myentries;
}
Dirk do you have any tipp how I could make
'home', 'custom', 'search', 'custom', 'plugins' ?
As well do you can give me a tipp how I could make the featured arcticle
on home with two languages?
'home', 'custom', 'search',
This is how I made it bilanguage:
Text Formatted Code
/**
* This is an example of a function that returns menu entries to be used for
* the 'custom' entry in $_CONF['menu_elements'] (see config.php).
*
*/
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER, $_COOKIE;
$myentries = array ();
if ( !empty ($_USER['language'])) {
$lang = $_USER['language'];
} elseif ( !empty ($_COOKIE['language'])) {
$lang = $_COOKIE['language'];
} else {
$lang = $_language_default;
}
if ( strtolower($lang) == "english_utf-8" ) {
$lang = 'en';
$myentries[] = array('url'=> $_CONF['site_url'].'/staticpages/index.php?page=products_en',
'label' => 'Products & Solutions');
} else {
$lang = 'de';
$myentries[] = array('url'=> $_CONF['site_url'].'/staticpages/index.php?page=products_de',
'label' => 'Produkte & Lösungen');
}
return $myentries;
}
Dirk do you have any tipp how I could make
'home', 'custom', 'search', 'custom', 'plugins' ?
As well do you can give me a tipp how I could make the featured arcticle
on home with two languages?
8
10
Quote
Status: offline
1000ideen
Forum User
Full Member
Registered: 08/04/03
Posts: 1298
There are a few threads on "multilingual"
Did you see this language pulldown block:
http://summitpages.ca/filemgmt/singlefile.php?lid=22
User euan also got interesting suggestions:
http://www.heatherengineering.com/staticpages/index.php/multilingual-en
>>featured arcticle on home with two languages?<<
Hm, I`d say translate it and welcome the user in 2 languages or use the language pulldown.
Did you see this language pulldown block:
http://summitpages.ca/filemgmt/singlefile.php?lid=22
User euan also got interesting suggestions:
http://www.heatherengineering.com/staticpages/index.php/multilingual-en
>>featured arcticle on home with two languages?<<
Hm, I`d say translate it and welcome the user in 2 languages or use the language pulldown.
10
11
Quote
Status: offline
suvi
Forum User
Chatty
Registered: 11/20/05
Posts: 44
Location:Zurich
I have implemented all the things from euans website. I even made some nice
flags to change the language. It works great for the blocks on left and write as well for a the menu.
Unfortunatly euan wrote me in a email that there can be only one featured article and therefore it is not possible. So I am asking here is in this forum is it possible to put some PHP in a article?
PHP would enable me to select the text according to an arctilce.
11
9
Quote
All times are EST. The time is now 12:40 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