Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
sax Wrote:Thank you mvlcek.
I didn't find out how your code <?php global $language; echo @$language ? $language : 'en'; ?> works,
but I thought that I18N sets the language according to the site name ending (..._en)?

I need 'de' language setting for german sites and 'en' for english sites because google robots ignore sites with wrong language settings (I had this problem before....). Is there another theme that can do this? Or do I have to make two versions of the same theme with different language settings?

Kind regards Matthias

Your theme seems to have a template that starts with
Code:
...
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
...
If you want to have the actual language instead, you must replace it with
Code:
...
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php global $language; echo @$language ? $language : 'en'; ?>" lang="<?php global $language; echo @$language ? $language : 'en'; ?>">
...
(You could also use 'de' as default at the end of expressions)
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I've been slowly building and adding plugins to my GS; nearly all of them are I18N plugins. A weird problem I started having yesterday is I noticed I can no longer click and drag pages on my I18N Navigation structure page to re-arrange them. Also on the Page Management page I can't use the "Show top pages only", "Show all pages", or "Save current state of page list" links. Clicking them just does nothing.

All of the plugins I'm using are:
Auto-open Page Options
I18N Gallery
I18N Search
I18N Custom Fields
p01-contact
I18N Navigation Multilevel navigation & breadcrumbs
Innovation Theme Settings
DynPages

I've tried deleting them and reinstalling them, but the same issue happens. I've tried disabling all of them and going through each one to see if turning one off fixes the problem, but nothing seems to work. I've installed the latest version of I18N hoping those new files would restore functionality but that hasn't worked either.

Any idea on what would cause these things to stop working?
Reply
antiquarium Wrote:I've been slowly building and adding plugins to my GS; nearly all of them are I18N plugins. A weird problem I started having yesterday is I noticed I can no longer click and drag pages on my I18N Navigation structure page to re-arrange them. Also on the Page Management page I can't use the "Show top pages only", "Show all pages", or "Save current state of page list" links. Clicking them just does nothing.

All of the plugins I'm using are:
Auto-open Page Options
I18N Gallery
I18N Search
I18N Custom Fields
p01-contact
I18N Navigation Multilevel navigation & breadcrumbs
Innovation Theme Settings
DynPages

I've tried deleting them and reinstalling them, but the same issue happens. I've tried disabling all of them and going through each one to see if turning one off fixes the problem, but nothing seems to work. I've installed the latest version of I18N hoping those new files would restore functionality but that hasn't worked either.

Any idea on what would cause these things to stop working?

Maybe you switched off Javascript for your browser (or for your site with NoScript plugin, etc.)?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
javascript is definitely enabled, and I wouldn't have installed anything that would have disabled javascript. Every aspect of every other plugin seems to work just fine.
Reply
antiquarium Wrote:javascript is definitely enabled, and I wouldn't have installed anything that would have disabled javascript. Every aspect of every other plugin seems to work just fine.

Then check if there are javascript errors on these pages (e.g. with the Webdeveloper bar for Firefox) and what the errors are.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Another thing I tested is everything works when I'm testing on my local MAMP server, but when i upload the files to my remote server, then the ability to click and drag pages and toggle those other elements stops working.
Reply
For the page Management page I get this error:
Quote:$("#filter").keyup(filterPages).autocomplete is not a function
multiple: false
load.p...8n_base (line 963)

For the Edit Navigation Structure Page I get this error:

Quote:$("#editnav tbody").sortable is not a function
update:drop
load.p...igation (line 1239)
Reply
you know what, I figured it out... With most of the issues I've encountered so far it came down to a .htaccess file with a Deny from All statement being in the wrong place. Sorry about all that x_x
Reply
hi!

thanks for the great plugin.
but i have one small problem ...
if i set a page to "hidden in menu" nothing happens - page is still available through menustructure ...
Code:
<?php get_i18n_navigation(return_page_slug(),0,99,true,I18N_SHOW_LANGUAGE); ?>

some ideas?
than you all ...
Reply
chainsaw81 Wrote:hi!

thanks for the great plugin.
but i have one small problem ...
if i set a page to "hidden in menu" nothing happens - page is still available through menustructure ...
Code:
<?php get_i18n_navigation(return_page_slug(),0,99,true,I18N_SHOW_LANGUAGE); ?>

some ideas?
than you all ...

Remove "true,", the function has only 4 parameters.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek,

I want to use different CSS in the sidebar-submenu if page is level 0 or not.

Can you please tell me how to set the condition in the template? I am somehow blocked in the moment ;=)

Thanks im Voraus,

Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Connie Wrote:mvlcek,

I want to use different CSS in the sidebar-submenu if page is level 0 or not.

Can you please tell me how to set the condition in the template? I am somehow blocked in the moment ;=)

Thanks im Voraus,

Connie

Change ul#sidemenu to the selector for your sidemenu:
Code:
/* first level */
ul#sidemenu li { ... }
ul#sidemenu li a { ... }
/* further levels */
ul#sidemenu li li { ... }
ul#sidemenu li li a { ... }
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
thanks for the precise answer, this is helpful for my styling

but my question was not precise enough:

I want to arrange something like this:

if this is not level 0 (top leveL) => write this text else => write another text

so I must find out if the page is level 0 or not (I do not want to create a separate template for level 0 pages and I do not want to use the explicite page slugs ;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Connie Wrote:I want to arrange something like this:

if this is not level 0 (top leveL) => write this text else => write another text

so I must find out if the page is level 0 or not (I do not want to create a separate template for level 0 pages and I do not want to use the explicite page slugs ;=)

Code:
<?php if (count(get_i18n_breadcrumbs(return_page_slug())) == 1) echo "Level 0"; else echo "Level 1+"; ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
thanks a lot, this is exactly what I need!
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Hello, and thank you for your plugin I18N but i meet a problem.

When I created a page in English (second lang lang default because of my site is in French) and some French pages I have a template assigned.

When I created the page in English and although I put in the default xml "template.php". It does not get the template assigned to the page that I want to create an English version.

I'm on last version of getsimple and i installed last version of i18n.
I don't understand why i have this problem.

If anyone can help me.

Thank you very much.
Reply
slumpy Wrote:Hello, and thank you for your plugin I18N but i meet a problem.

When I created a page in English (second lang lang default because of my site is in French) and some French pages I have a template assigned.

When I created the page in English and although I put in the default xml "template.php". It does not get the template assigned to the page that I want to create an English version.

I'm on last version of getsimple and i installed last version of i18n.
I don't understand why i have this problem.

The template (as well as parent and menu position) of the other language version is always the same as that of the default language. You shouldn't get the template selection for additional languages (but there might be bugs so that it is not hidden correctly sometimes).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
yes actually page in English must take the default template of the page in French. But that does not work.

I do not understand why and I do not see where in the code this bug

an idea ? Sad
Reply
slumpy Wrote:yes actually page in English must take the default template of the page in French. But that does not work.

I do not understand why and I do not see where in the code this bug

an idea ? Sad

What do you mean with "does not work"? Do you get an error message? Or is another template used?
Latest version of GetSimple = 3.0? It's not tested with 3.1beta.
Can you give me a link to your site or is it on localhost?
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
mvlcek Wrote:What do you mean with "does not work"? Do you get an error message? Or is another template used?
Latest version of GetSimple = 3.0? It's not tested with 3.1beta.
Can you give me a link to your site or is it on localhost?

My version of GetSimple is 3.0 and i haven't mistake but it is another template used, the default template "template.php" then i use a lot of template as galerie.php, catgalerie.php etc...
Reply
If the user is on a child page how can we show the parent page menu item in active state so the user can identify which main page of the navigation structure he is in?

Basically I want both, the parent page and its child page to be in the highlighted/active stage if the user is on the child page.
Reply
li.currentpath a {...}for parent page
li.current a{...} for child page
http://u-la-la.ru/stilnye-shtuchki.html
Reply
Oleg06 Wrote:li.currentpath a {...}for parent page
li.current a{...} for child page
http://u-la-la.ru/stilnye-shtuchki.html

Great. Thanks.
Reply
Mvlcek: is there a way to prevent parent item from being clicked if it contains slugs ?
Let's say I'd like to show 2 menus.
One is a 1 lvl flat main menu bar, where 1 element contains nested siblings.
e.g. : index | page 1 | page 2 | contact
page 1 has siblings:
subpage1-1
subpage 1-1-1
subpage 1-1-2
subpage1-2
subpage 1-2-1
subpage 1-2-2
and so on
What I'd like to do, is to prevent subpage 1-1 and subpage 1-2 from being clicked.
I could do this by using jquery and using a click prevent function.
But I don't want to load jquery only to block clicking (I don't use any fancy things with jquery), and it won't work with disabled jscript.

I've got a feeling that some variables may be passed when invoking get_i18n_navigation, and get rid of <a href> for elements having class open.
It would be nice if such elements could be transformed into some kind of a header in menu.

I have a strange feeling that somebody asked for same thing long time ago.
Addons: blue business theme, Online Visitors, Notepad
Reply
yojoe Wrote:Mvlcek: is there a way to prevent parent item from being clicked if it contains slugs ?

No, this is not possible.
But you can use the I18N Custom Fields plugin and a custom link field named link to forward the user to a sub page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 15 Guest(s)