Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
#76
mvlcek,

I've run into a problem here with the I18N-Navigation. If HOME has subpages, clicking a subpage's link won't load it, the home page stays put.

The paths look like www.domain.de/index/subpage which follows the default fancy URL structure %parent%/%slug%/. The installation resides in the root folder for the domain, not a subfolder.

How can I make this work?
Reply
#77
polyfragmented Wrote:mvlcek,

I've run into a problem here with the I18N-Navigation. If HOME has subpages, clicking a subpage's link won't load it, the home page stays put.

The paths look like www.domain.de/index/subpage which follows the default fancy URL structure %parent%/%slug%/. The installation resides in the root folder for the domain, not a subfolder.

How can I make this work?

Works for me. Maybe you have custom rewrite rules in your .htaccess?
Are the navigation links correct?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#78
mvlcek Wrote:Works for me. Maybe you have custom rewrite rules in your .htaccess?
Are the navigation links correct?

It works also for me.
Aren't you using any caching plugin maybe ?
Try also with url structure without parent, only %slug%
Addons: blue business theme, Online Visitors, Notepad
Reply
#79
mvlcek Wrote:Works for me. Maybe you have custom rewrite rules in your .htaccess?
Are the navigation links correct?
Not using any rewrite rules other than the default. Are the navigation links correct? I can only tell you that they follow the default scheme for fancy URLs in the backend. It works for any other top-level navi entry and its children here.

The .htaccess looks like this:

Quote:AddDefaultCharset UTF-8
Options -Indexes

# Added by Thorsten, 20110419-1620
AddHandler php53-cgi .php

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
Order allow,deny
Deny from all
Satisfy All
</Files>
<Files sitemap.xml>
Order allow,deny
Allow from all
Satisfy All
</Files>

RewriteEngine on

# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase '/'

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]

This is the vanilla default (as far as I can tell) with one addition for PHP CGI mode, but no extra rewrite rules

yojoe Wrote:Aren't you using any caching plugin maybe ?
Try also with url structure without parent, only %slug%
Not using any caching plugin at all. Without %parent% it works, but this is not what I want. I'd like to use the system's default which is %parent%/%slug%/. As mentioned above in reply to mvlcek, it works for any other top-level navi entry and it's children.
Reply
#80
Any chance for a linky ?
Or you are developing the website on localhost ?
Moving all pages out of index parent, and adding them again after clearing cache doesn't work ?

btw. i18n plugin caches whole menu Wink
Try to clear i18n_menu_cache.xml, or even delete it.
Addons: blue business theme, Online Visitors, Notepad
Reply
#81
yojoe Wrote:Any chance for a linky ?
I'm going to send you a link via PM.


yojoe Wrote:Moving all pages out of index parent, and adding them again after clearing cache doesn't work ?
Nope, doesn't do anything. As soon as I move a page outside index and inside any other top-level menu entry, the subpage is being loaded OK though.


yojoe Wrote:btw. i18n plugin caches whole menu Wink
Try to clear i18n_menu_cache.xml, or even delete it.
OK, I wasn't aware of that. I deleted the cache file, to no avail.
Reply
#82
mvlcek,

apart from the fact that I'm experiencing problems with domain.tld/index/subpage, is there any chance one can remove the index from HOME subpage links?

domain.tld/subpage for HOME looks cleaner to me.
Reply
#83
Is there any way to override the automatic default language selection and setup plugin so, that index page always shows the language that I define?
Reply
#84
Joshas Wrote:Is there any way to override the automatic default language selection and setup plugin so, that index page always shows the language that I define?

To ALWAYS show a specific language for the index page, just define the default language version and none else.

To show a specific language version, if the user hasn't selected a language yet: this is not currently supported.
But if you use Apache, you can add a RewriteRule to your .htaccess to rewrite the URL to URL?setlang=en (replace en with the desired language), if the user has no session yet (no cookie PHPSESSID). You must check the Apache documentation for the syntax on how to do it.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#85
Can't find the reason for the /index/subpage situation, trying Connie's server. Sorry for bothering you in your plugin thread.
Reply
#86
mvlcek,

I'm currently trying to output an info text when a secondary navigation has no entries (no subpages available). My code works on pages without subpages and the info text is output. On pages with subpages the submenu is displayed and my info text is as well. It shouldn't be. Where's/What's the flaw in my PHP?

Code:
<?php
    if (!get_i18n_navigation(return_page_slug(),1,10)) {
        
        echo 'Es gibt in diesem Bereich keine Unterseiten.';
                
    } else {
                
        get_i18n_navigation(return_page_slug(),1,10);
                
        }
?>

I tried some variants of the comparison as checking for '' or FALSE, same behaviour here...
Reply
#87
polyfragmented Wrote:mvlcek,

I'm currently trying to output an info text when a secondary navigation has no entries (no subpages available). My code works on pages without subpages and the info text is output. On pages with subpages the submenu is displayed and my info text is as well. It shouldn't be. Where's/What's the flaw in my PHP?

Code:
<?php
    if (!get_i18n_navigation(return_page_slug(),1,10)) {
        
        echo 'Es gibt in diesem Bereich keine Unterseiten.';
                
    } else {
                
        get_i18n_navigation(return_page_slug(),1,10);
                
        }
?>

I tried some variants of the comparison as checking for '' or FALSE, same behaviour here...

I think, get_i18n_navigation returns an empty array in this case, try count(return_i18n_menu_data(...)) == 0

In general, if you are not sure, what a function returns, include code like the following to find out:
Code:
$myresult = return_i18n_menu_data(...);
print_r($myresult);

Edited: use return_i18n_menu_data instead, get_i18n_navigation outputs the menu and returns nothing.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#88
Got it!
Code:
<?php
     // Check whether the return_i18n_menu_data array has no elements for the submenu
    // 'return_page_slug(),1,10' is the same as in 'get_i18n_navigation(return_page_slug(),1,10);'
    // to call up the submenu

    if (count(return_i18n_menu_data(return_page_slug(),1,10)) == 0) {

        echo 'Es gibt in diesem Bereich keine Unterseiten.';

    } else {

        get_i18n_navigation(return_page_slug(),1,10);

    }
?>

Now works, thanks for the hint.
Reply
#89
I18N Version 1.4:
  • adds the css classes "open" or "closed" to menu items with children. This allows you to style menu items with children differently than those without.

This update is an answer to a request of snooze.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#90
Hello,
I tried a lot of CSS but by now I can't give an other color to active links, I tried to give define the "current" class but it didn't work. So my question is: what's the CSS tag to call the "current" style? (.current? li .current? , ...)

p.s. the plugin works really great and is a great help for me, thanks a lot!
Reply
#91
Hey,

danielec Wrote:I tried a lot of CSS but by now I can't give an other color to active links, I tried to give define the "current" class but it didn't work. So my question is: what's the CSS tag to call the "current" style? (.current? li .current? , ...)
Since you are trying to style links with your CSS, you must target hyperlinks, not the parent li element itself:

Code:
li.current a {your-styles-here;}
Reply
#92
Hello everyone
I gotta confused upon trying to generate full human-readable sitemap. I've got the multilingual navigation plug-in installed but unable to output the whole site structure. No sub-level links are shown, only the root level. I tried using all of the examples listed in this topic but nothing helped.
I'm using GetSimple v3.0 and I18N Navigation v1.3
Got any ideas?
I currently use this:
Code:
<?php get_i18n_navigation(return_page_slug(), 0,99, showall); ?>
Hail to get-simple developers!
Reply
#93
reff Wrote:Hello everyone
I gotta confused upon trying to generate full human-readable sitemap. I've got the multilingual navigation plug-in installed but unable to output the whole site structure. No sub-level links are shown, only the root level. I tried using all of the examples listed in this topic but nothing helped.
I'm using GetSimple v3.0 and I18N Navigation v1.3
Got any ideas?
I currently use this:
Code:
<?php get_i18n_navigation(return_page_slug(), 0,99, showall); ?>

The function call syntax has changed:
Code:
<?php get_i18n_navigation(return_page_slug(), 0, 99, I18N_SHOW_PAGES); ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#94
Greatest thanks, this worked perfectly!
Hail to get-simple developers!
Reply
#95
polyfragmented Wrote:Hey,
Since you are trying to style links with your CSS, you must target hyperlinks, not the parent li element itself:

Code:
li.current a {your-styles-here;}

Hello,
thanks for your fast answer.
But the problem still remains with this code, the current page links does change color... I really don't understand why it does work.

p.s. if it helps the link to the website: http://www.concordia-forio.it/
Reply
#96
danielec Wrote:But the problem still remains with this code, the current page links does NOT change color... I really don't understand why it does NOT work.

p.s. if it helps the link to the website: http://www.concordia-forio.it/

CSS styles are more important the more specific they are. You have:
Code:
#footer .menu ul li a { ... }
li.current a { ... }

Basically the longer the expression the more important, thus your style for "current" items is never used. Change it to
Code:
#footer .menu ul li a { ... }
#footer .menu ul li.current a { ... }
and it will (most probably) work.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#97
Hello mvlcek,
thanks a lot for the explanation and answer!
It works really well! After three days trying you saved my mind! Thanks so much! It's really nice to you guys to help so fast and so good!
Reply
#98
First of all, this is a great plugin and hats off for your efforts. I was wondering if this plugin can help me translate the name of the site. I need to set up a Chinese version of the site, so I assume I will be using 'zh', not exactly sure of its language code. I also noticed the menu title for a page has not changed, is there an option to do so?
And one more thing, I tried the links to your website at mvlcek.bplaced.net, but it just contains ads? What happened to the site and its contents?

Regards,
Angela
Reply
#99
angelazou Wrote:First of all, this is a great plugin and hats off for your efforts. I was wondering if this plugin can help me translate the name of the site. I need to set up a Chinese version of the site, so I assume I will be using 'zh', not exactly sure of its language code. I also noticed the menu title for a page has not changed, is there an option to do so?

I don't understand.
You create two pages, e.g. default "my-page" in english and my-page_zh" in chinese. For each of these two versions you can enter a title and a menu text. The menu (called with get_i18n_navigation from your template) shows the menu text in the relevant language and the title in the title-Attribute of the link. If no menu text is set, the title in the relevant language is also used as menu text.

angelazou Wrote:And one more thing, I tried the links to your website at mvlcek.bplaced.net, but it just contains ads? What happened to the site and its contents?

http://mvlcek.bplaced.net/ still works perfectly for me - there are NO ads.
Do you use a bad proxy?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:
angelazou Wrote:First of all, this is a great plugin and hats off for your efforts. I was wondering if this plugin can help me translate the name of the site. I need to set up a Chinese version of the site, so I assume I will be using 'zh', not exactly sure of its language code. I also noticed the menu title for a page has not changed, is there an option to do so?

I don't understand.
You create two pages, e.g. default "my-page" in english and my-page_zh" in chinese. For each of these two versions you can enter a title and a menu text. The menu (called with get_i18n_navigation from your template) shows the menu text in the relevant language and the title in the title-Attribute of the link. If no menu text is set, the title in the relevant language is also used as menu text.

angelazou Wrote:And one more thing, I tried the links to your website at mvlcek.bplaced.net, but it just contains ads? What happened to the site and its contents?

http://mvlcek.bplaced.net/ still works perfectly for me - there are NO ads.
Do you use a bad proxy?


Thanks for the info. Well, the thing is, I have finished my Chinese pages, and it works correctly, except that the menu text is still in English (I have set the Chinese menu text). I also would like to know how to translate for the component section, I know this is probably already listed in your website, but like I said, I'm seeing your website in ads only. I've attached a screen shot, not sure what is happening.

Regards,
Angela
Reply




Users browsing this thread: 1 Guest(s)