Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
Thx a lot man Smile) I will try it Smile)
Reply
HI,i've got some problems with i18n navigation.i want to show in my footer all different childs menu.example : parent = societe | childs = presentation , fondateurs .in my footer i just want to show childs of the
Reply
kirua46 Wrote:HI,i've got some problems with i18n navigation.i want to show in my footer all different childs menu.example : parent = societe | childs = presentation , fondateurs .in my footer i just want to show childs of the

Code:
<ul><?php get_i18n_navigation(return_page_slug(),1,1); ?></ul>
(show current menu tree from level 1 to level 1 - level 0 = top)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
hi sorry i don't understand what you are asking to me (i'm french) so you want i show you my menu tree ?
Reply
kirua46 Wrote:hi sorry i don't understand what you are asking to me (i'm french) so you want i show you my menu tree ?

No, put the above code into your template and it will show the first level of the menu, the children of the current top level page, like you wanted it. At least that's how I interpreted your question, which just ends in the middle of a sentence.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
thank you

end of the sentence :

with i want to show only childrens of the parent page ("service")


(show current menu tree from level 1 to level 1 - level 0 = top) <- how can i put that in the code ?
Code:
<?php get_i18n_navigation(return_page_slug(show_current_menu_tree),1,1); ?>
?

loic.
Reply
Hello,

I'm trying to display sub-pages of current parent including specified parent page itself.

The code I use:

Code:
<?php get_i18n_navigation('malta-holidays',2,2); ?>

This code displays sub-pages of a page called malta holidays but I need to have the following menu:

Code:
- malta holidays
-- sub-pages

My pages structure is:

Code:
Index
- Malta molidays
-- sub page i.e level 2.

-- other page
-- other page

as you might see I cannot use

Code:
<?php get_i18n_navigation('malta-holidays',1,2); ?>

because otherwise it will display the required pages plus other pages which I don't need.

Is there any parameter I can use to display the page - malta holidays (1) and its subpages (2) but without other (1) pages?

Thanks.
Reply
I18N version 1.8.1:
  • automatically redirect from "View all pages" to "View all pages (I18N)"
  • russian translation (for base) by iyntx - thanks.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Hi! Need some help, please.

Whatever reason, this plagin doesn't work for me. It just can't display any subpages from parent in my case, ie <?php get_i18n_navigation('page-slug',1,2); ?>. No code is working. I dunno why.
Reply
3.1b 533 -> i18n_base.php -> clicking on pages leads to:
Not Found
The requested URL /admin/load.php was not found on this server.


disabling i18n_base.php plugin gives me access to page administration.
Addons: blue business theme, Online Visitors, Notepad
Reply
yojoe Wrote:3.1b 533 -> i18n_base.php -> clicking on pages leads to:
Not Found
The requested URL /admin/load.php was not found on this server.


disabling i18n_base.php plugin gives me access to page administration.

I suppose you have either renamed the admin folder or installed GetSimple into a subfolder?

I18N version 1.8.2:
  • uses relative links to redirect from View all Pages to View all Pages (I18N).

As far as I know a redirect URL must be absolute (including host), however, relative URLs seem to work, as GetSimple uses them all the time ;-)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
hmm...tbh both reasons lead to this error :]
But it makes me a bit confused as I changed admin dir after installing i18n and adding a page.


It may be again a prob with developing on windows platform, and after moving to production server everything will work as supposed Smile
(after changing path to admin dir in plugin files of course)
Addons: blue business theme, Online Visitors, Notepad
Reply
yojoe Wrote:hmm...tbh both reasons lead to this error :]
But it makes me a bit confused as I changed admin dir after installing i18n and adding a page.

Does version 1.8.2 fix the problem?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I18N version 2.0:
  • simplifies the management of sites with lots of pages by allowing you to open and close pages with children (like folders) in I18N pages view
  • allows you to save the current state for the following calls to I18N pages view
  • the filter in the I18N pages view will still search over all pages, be they visible or not
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I18N version 2.1
  • new function get_i18n_header (instead of get_header: adds language to canonical URL, removes tags starting with _ from keywords)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I18N version 2.2:
  • autocompletion for tags/keywords, when editing a page
  • filter by tag (with autocomplete) in pages view (type : and then the tag)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
thanks for autocomplete tags, it is easier for my work
Reply
I18N version 2.3:
  • Option to include language in fancy URL, if special language is requested, e.g. /products/notebook:en/ (use get_i18n_page_url or find_i18n_url or return_i18n_lang_url, if you need to construct URLs)

Define a separator in gsconfig.php (it should be a unique character/string, which does not exist in slugs):
Code:
define('I18N_SEPARATOR',':');

Adjust the RewriteRules in .htaccess, e.g. my rules supporting language and page numbers in the URL are:
Code:
...
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(.*):([a-z]+)([^a-z/][^/]*)?/?$ $1$3?lang=$2 [QSA,DPI]
RewriteRule ^(.*);(\d+)([^\d/][^/]*)?/?$ $1$3?page=$2 [QSA,DPI]
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Hi,

First of all, thank you for the excellent plugin.

I do have a slight problem and can't seem to solve it, hopefully you can help me get around.

I am using the following in my header to switch the language of the page

Code:
<a id="lang-de" href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">Deutsch</a>
<a id="lang-en" href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>">English</a>

I am also using language in the url (%language%/%parent%/%slug%) and rules required for this to work are placed in the .htaccess file.

Two languages are defined and everything works correctly (switching between the two versions of the page).

The problem I have is with the index page.

I have an index page (slug is greyed out, can't be changed) in my default language (de) and have an english translation of that page with the slug index_en.

What happens on the index page is that it always returns to the index page in the default language (de) regardless of the language button clicked.

Is there a way to make this work on the index page as well?

And one more question - is it possible to disable auto-language detection and always use the predefined language when first loading any of the pages (before $_SESSION is set)?

Why I ask this - browsers are usually set to English language by default and many people don't bother to go to their preferred browser's settings to add another language.
Reply
dizarter Wrote:The problem I have is with the index page.

I have an index page (slug is greyed out, can't be changed) in my default language (de) and have an english translation of that page with the slug index_en.

What happens on the index page is that it always returns to the index page in the default language (de) regardless of the language button clicked.

Is there a way to make this work on the index page as well?

And one more question - is it possible to disable auto-language detection and always use the predefined language when first loading any of the pages (before $_SESSION is set)?

Why I ask this - browsers are usually set to English language by default and many people don't bother to go to their preferred browser's settings to add another language.

I have uploaded version 2.4 - the problem with the index page should be solved and I added an option for the user language (see next post).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I18N version 2.4:
  • solves a problem that did not allow switching languages on the home page, when using fancy URLs with the language placeholder %language%
  • you can now choose to ignore the language(s) the user has set in his browser (and serve the default language, if he has not chosen a language yet). Add the following line to gsconfig.php:
Code:
define('I18N_IGNORE_USER_LANGUAGE',true);
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I tried to install the code, but the result is all broken locally
Code:
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(.*):([a-z]+)([^a-z/][^/]*)?/?$ $1$3?lang=$2 [QSA,DPI]
RewriteRule ^(.*);(\d+)([^\d/][^/]*)?/?$ $1$3?page=$2 [QSA,DPI]
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]
Reply
I hate to repost, however, I think this is also relevant to the I18N plugin.
Code:
RewriteRule ^blog/tag/([^/.]+)/?$ index.php?id=blog&tag=$1 [L]
RewriteRule ^blog/post/([^/.]+)/?$ index.php?id=blog&post=$1 [L]
RewriteRule ^blog/page/([^/.]+)/?$ index.php?id=blog&page=$1 [L]
RewriteRule ^blog/archive/([^/.]+)/?$ index.php?id=blog&archive=$1 [L]

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

I found a conflict between using language codes in the URL with the I18N plugin and using clean URLS with the news manager. The URL for the news manager includes the %language% instead of the particular en/es/de ect. I guess this would involve modifying the news manager .htaccess rules too? I'm afraid to screw up my rewrite rules.
Todo arde si le aplicas la chispa adecuada.
Reply
yurifanboy Wrote:I found a conflict between using language codes in the URL with the I18N plugin and using clean URLS with the news manager. The URL for the news manager includes the %language% instead of the particular en/es/de ect. I guess this would involve modifying the news manager .htaccess rules too? I'm afraid to screw up my rewrite rules.

I don't know when you get the %language% in the URL.
I just tried (the newest) news manager, fancy URLs switched on, with (the newest) I18N plugin and the URLs generated always contain en or de.
To forward these URLs to news manager, it is sufficient to remove the ^ in front of the news manager rules. But you can also change the rules to
Code:
RewriteRule ^(es|en)/(blog)/(tag|post|page|archive)/([^/.]+)/?$ index.php?id=$2&$3=$4 [L]
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Oleg06 Wrote:I tried to install the code, but the result is all broken locally
Code:
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(.*):([a-z]+)([^a-z/][^/]*)?/?$ $1$3?lang=$2 [QSA,DPI]
RewriteRule ^(.*);(\d+)([^\d/][^/]*)?/?$ $1$3?page=$2 [QSA,DPI]
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^ index.php [L]

What is the problem?
And just for clarification: the above code only shows the rules part of the .htaccess. Don't throw away the part before like
Code:
...
RewriteEngine on
RewriteBase /
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 4 Guest(s)