Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
@mvlcek: now i install new version but same result (switch does not work) look on the german side "kontakt & impressum" switch to english instead of german language if stay in the german menue.

The posting i link i my last posting dosn´t implant in the new version please fix too
Reply
I18N version 3.2.5:
  • adds the queued scripts in get_i18n_header as pointed out by @Kolyok
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Thanks for fast reply and update of the plugin!
Reply
Hi,
I have installed I18N plugin version 3.2.5 on my GS 3.2.3 and found a bug in Multilevel navigation.

When I go Edit Navigation Structure menu and do not change anything, just click Save Navigation Structure, order of pages are changing, every time. Also it's impossible to save pages in selected order.

Steps to reproduce:
1. Download and install clean GS 3.2.3
2. Install I18N plugin v 3.2.5 and enable only I18N in plugins tab.
3. Create page with title: test1 and test2.
4. Go to Edit Navigation Structure and click Save Navigation Structure

mvlcek, could you check it?
http://flexphperia.net - my portfolio
Reply
Hello. I am new to GetSimple and to I18N.

I've just installed the plugin, and I have the following issue:

I added some HTML in the menú text for my pages. For example, the menú text for the "gallery" page was this:

<i class="fa fa-picture-o fa-fw"></i>&nbsp; gallery

I am using FontAwesome for showing some nice icons in the menú.

It was working perfectly, but after installing and activating I18N, the menu is showing all the HTML stuff! Sad

How can I fix it???

Thank you in advance.
--
vicent
Reply
(2013-12-11, 07:58:49)vginer Wrote: I added some HTML in the menú text for my pages. For example, the menú text for the "gallery" page was this:

I18N interprets all menu texts as text (without HTML).
Thus you need to use Custom Rendering with a component like that (no htmlspecialchars() around $item->text):
Code:
<li class="<?php echo $item->classes; ?>">
  <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php echo $item->text; ?>
  </a>
  <?php if ($item->isOpen) { ?>
    <ul><?php $item->outputChildren(); ?></ul>
  <?php } ?>
</li>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-12-11, 19:47:37)mvlcek Wrote: I18N interprets all menu texts as text (without HTML).
Thus you need to use Custom Rendering with a component like that (no htmlspecialchars() around $item->text):
Code:
<li class="<?php echo $item->classes; ?>">
  <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php echo $item->text; ?>
  </a>
  <?php if ($item->isOpen) { ?>
    <ul><?php $item->outputChildren(); ?></ul>
  <?php } ?>
</li>

I am not so familiar with components yet. But I guess that you suggest replacing the usual "menu" code in the template with that "customized" component, don't you?
--
vicent
Reply
(2013-12-11, 19:47:37)mvlcek Wrote: I18N interprets all menu texts as text (without HTML).
Thus you need to use Custom Rendering with a component like that (no htmlspecialchars() around $item->text):
Code:
<li class="<?php echo $item->classes; ?>">
  <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php echo $item->text; ?>
  </a>
  <?php if ($item->isOpen) { ?>
    <ul><?php $item->outputChildren(); ?></ul>
  <?php } ?>
</li>

I finally understood and it works fine again! Thank you. Smile
--
vicent
Reply
(2013-11-29, 18:52:30)mganko Wrote: Hi,
I have installed I18N plugin version 3.2.5 on my GS 3.2.3 and found a bug in Multilevel navigation.

When I go Edit Navigation Structure menu and do not change anything, just click Save Navigation Structure, order of pages are changing, every time. Also it's impossible to save pages in selected order.

Steps to reproduce:
1. Download and install clean GS 3.2.3
2. Install I18N plugin v 3.2.5 and enable only I18N in plugins tab.
3. Create page with title: test1 and test2.
4. Go to Edit Navigation Structure and click Save Navigation Structure

mvlcek, could you check it?


Can anyone help with this bug?
http://flexphperia.net - my portfolio
Reply
(2013-11-29, 18:52:30)mganko Wrote: Hi,
I have installed I18N plugin version 3.2.5 on my GS 3.2.3 and found a bug in Multilevel navigation.

When I go Edit Navigation Structure menu and do not change anything, just click Save Navigation Structure, order of pages are changing, every time. Also it's impossible to save pages in selected order.

Steps to reproduce:
1. Download and install clean GS 3.2.3
2. Install I18N plugin v 3.2.5 and enable only I18N in plugins tab.
3. Create page with title: test1 and test2.
4. Go to Edit Navigation Structure and click Save Navigation Structure

mvlcek, could you check it?


I've fixed this bug by replacing line 197 in file:
i18n_navigation/structure.php

from this:
PHP Code:
$pages subval_sort($pages,'sort'); 

to this:
PHP Code:
$pages subval_sort($pages,'sort','asc'false); 

mvlcek, please check my solution and update your plugin, without this fix using i18n_navigation plugin to create navigation structure is unusable (random order of pages every time I save changes) on GS 3.2.3 (I've not tested other versions).
http://flexphperia.net - my portfolio
Reply
(2013-12-17, 04:43:31)mganko Wrote: I've fixed this bug ...

I have never seen this problem. I just tried exactly as your steps to reproduce, with a clean installation of GS + I18N, and I still do not have a problem.
--
Nick.
Reply
(2013-12-17, 19:57:18)hameau Wrote:
(2013-12-17, 04:43:31)mganko Wrote: I've fixed this bug ...

I have never seen this problem. I just tried exactly as your steps to reproduce, with a clean installation of GS + I18N, and I still do not have a problem.

Whenever I try a have this problem the bug only occurs on root pages in navigation structure, not on order of childrens.
Please check again, detailed steps:
Steps to reproduce:
1. Download and install clean GS 3.2.3
2. Install I18N plugin v 3.2.5 and enable only I18N (only navigation) in plugins tab.
3. Create page with title: test1 and test2.
4. Go to Edit Navigation Structure and click Save Navigation Structure
5. Repeat step 4 again and again every time when you save it displays random structure even as you have not changed anything.

Update:
I've checked again and bug dissapeard Smile Maybe it's a problem of the browser or PHP version, I don't know I will check again on a computer and server where I've found it.


Update2:
I've checked and bug confirmed on clean GS 3.2.3 install on PHP 5.2.11 (ZendServer) and any browser. Maybe problem is related to nat_sort function, some changes was made in PHP 5.2.10 (http://www.php.net/manual/en/function.natsort.php), I have no clue, my fix works.
http://flexphperia.net - my portfolio
Reply
How to force setlang in template? For example i have 1 page for 2 languages.
Reply
in file sitemap.xml
Code:
<url><loc>http://mydomen/%parents%/hhhhhhhhhh</loc><lastmod>2014-01-06T21:45:13+00:00</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
Reply
Hello.
get_i18n_navigation(return_page_slug(),0,0)
It's possible to add in structured menu in front- end template how many subpages is in page like:

| Home Page
| Page one (3)
+ sugpage one
+ subpage two
+ subpage three
| Contact

i'm talking about this number (3)
user plugin: scroll to top
Reply
@mvlcek

Since GS 3.3.0 there is a 'sitemap' filter. It would be great if I18N uses it in some next release.
Reply
can some one help how to change in I18N i18n_navigation

to create a submenu with arrows when is a submenu

i have a css for multi level menu in html

look at this:
this is a html file

PHP Code:
<ul id="mainmenu">
    <
li><a href="#">Home page</a></li>
    <
li><a href="#">Information<class="arrow"></i></a>
        <
ul>
            <
li><a href="#">Welcome level #2</a></li>
            
<li><a href="#">Welcome level  #2</a></li>
            
<li><a href="#">Welcome level  #2</a></li>
        
</ul>
    </
li>
    <
li><a href="#">Gallery <class="arrow"></i></a>
        <
ul>
            <
li><a href="#">Welcome level  #2</a></li>
            
<li><a href="#">Welcome level  #3 <i class="arrow"></i></a>
                
<ul>
                    <
li><a href="#">Welcome level  #3</a></li>
                
</ul>
            </
li>
            <
li><a href="#">Welcome level  #2</a></li>
        
</ul>
    </
li>
</
ul

the css file is look like:

PHP Code:
#mainmenu, #mainmenu ul {list-style: none; margin: 0; padding: 0;}
#mainmenu ul {width: 160px;}
#mainmenu ul li {clear: both;}
#mainmenu > li {float: left; margin-right: 10px; position: relative;}
#mainmenu > li li {position: relative;}
#mainmenu > li ul {position: absolute; left: 0;}
#mainmenu > li ul li ul {position: absolute; left: 160px; top: 0px;}
ul ul {displaynone;}[/code]
ul li:hover ul {displayblock;}

/*level 1*/
#mainmenu {margin: 50px 50px; font-family: calibri; tahoma, arial;}
#mainmenu > li > a {display: table; width: auto; padding: 8px; border-radius: 3px; text-align: center; text-decoration: none; color: #84c5f7;}
#mainmenu > li:hover > a {background: #eee; color: #0090ff;}

/*level next*/
#mainmenu ul {font-size: 12px; border-radius: 3px; background: #eee;}
#mainmenu ul li > a {color: #999; display: block; padding: 5px; border-radius: 3px; text-decoration: none;}
#mainmenu ul li:hover > a {color: #eee; background: #aaa;}

.arrow {displayinline-blockmargin0 5px 0height0vertical-aligntopcontent""positionabsolute;}
#mainmenu > li > a > .arrow {top: 17px; right: 0; margin-right: -8px; border-top: 3px solid #333; border-right: 3px solid transparent; border-left: 3px solid transparent;}
ul ul .arrow {top10pxright0border-top3px solid transparentborder-right3px solid transparentborder-left3px solid #333; border-bottom: 3px solid transparent;} 

i'm was a add this code for a getsimple page.. but how to enable a aroows ??

this multilevel menu is brilliant and simple ... but how to integrate it with arrows ?
can someone help?

this is the demo of full menu (found in google - in polish)
http://webroad.pl/poradnik/menu-wielopoziomowe/

----
the seccond questions:
how to give in menu in all of level menu different class or id?
i think about example:
i'm searching something like that.. to level menu one

PHP Code:
<li class="dir">About>
                <
ul>
                    <
li><a href="./">Menu Subitem #1</a></li>
                    
<li><a href="./">Menu Subitem #2</a></li>
                    
<li><a href="./">Menu Subitem #3</a></li>
                    
<li><a href="./">Menu Subitem #4</a></li>
                
</ul>
            </
li

online previev example:
http://www.lwis.net/free-css-drop-down-m...ontal.html
user plugin: scroll to top
Reply
This is also being discussed here: http://get-simple.info/forums/showthread...1#pid42931

However seeing as this also has to do with I18n's Edit navigation structure function I will also post it here for Mvlcek.

The Edit navigation structure function doesn't seem to work properly any more since the 3.3.0 update. I can change the order of pages but it will not save them.

Strangest thing is that it did initially work after I updated but ever since adding a good number of pages to our site it doesn't save them any more.

The total number of pages is now 228. And before it was around 160-170.

Not sure if that has anything to do with things, but I thought it would be good to mention.

Shawn posted a hotfix on GitHub for the regular menu manager bug but with or without the fix its i18n counterpart (at least the one on our site) will not work.

Datiswous experiences the same thing. Shawn did not, I didn't either but do now.

I am not entirely sure if this is a core of i18n plugin bug so therefore I think it is good to make a mention of it here too.
Reply
Draxeiro,
that is strange. I have updated to 3.3.0 the day it was released (28th January I guess) and everything still works fine.
I have "only" 28 pages (not all of them in menu) and about 20 posts of News Manager. I have tried changing order of the menu items and I didn't notice any troubles. Maybe it comes with the high number of pages, I don't really know, just saying that it's not a bug that shows to everyone in general.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2014-02-10, 20:04:05)TeeJay Wrote: Draxeiro,
that is strange. I have updated to 3.3.0 the day it was released (28th January I guess) and everything still works fine.
I have "only" 28 pages (not all of them in menu) and about 20 posts of News Manager. I have tried changing order of the menu items and I didn't notice any troubles. Maybe it comes with the high number of pages, I don't really know, just saying that it's not a bug that shows to everyone in general.

It was the exact same for me. On a smaller site there was not a problem and even on our rather big site, there wasn't a problem either. That is, until I added a good number of extra project pages bringing the total to 228.

So I am guessing too that it might be related to that.
Reply
(2014-02-10, 20:47:37)Draxeiro Wrote:
(2014-02-10, 20:04:05)TeeJay Wrote: Draxeiro,
that is strange. I have updated to 3.3.0 the day it was released (28th January I guess) and everything still works fine.
I have "only" 28 pages (not all of them in menu) and about 20 posts of News Manager. I have tried changing order of the menu items and I didn't notice any troubles. Maybe it comes with the high number of pages, I don't really know, just saying that it's not a bug that shows to everyone in general.

It was the exact same for me. On a smaller site there was not a problem and even on our rather big site, there wasn't a problem either. That is, until I added a good number of extra project pages bringing the total to 228.

So I am guessing too that it might be related to that.

As there is no hard limit in the I18N plugin, this might be caused by one of the following:
  • not enough memory for PHP
  • saving exceeds maximum time allowed for a request
  • too many open files
Please turn on debugging and also look at the (PHP) log files.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
This is fixed in 3.3.1 alpha please use that version when testing this and report in that thread linked.
See downloads page.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
(2014-02-11, 00:12:30)shawn_a Wrote: This is fixed in 3.3.1 alpha please use that version when testing this and report in that thread linked.
See downloads page.

I did implement your hotfix (to no avail with regards to this particular issue), isn't that what you added to 3.3.1 alpha as a fix?
Reply
yes, but for proper support you need to be running it. I have no idea what you did, need a level playing field to confirm bugs.

mvlcek
How do I change your nav plugin to not treat every single slug with an underscore as a lang when its shows up in pages?
I thought I read this was changed to only detect valid lang strings.

I am having trouble using my enormous qa test site to test your plugin cause I have slugs like this
gen_15196045

Also is this a bug ?
I cannot outdent (reverse of indent) the first and last items in the menu manager.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
(2014-02-11, 01:26:49)shawn_a Wrote: mvlcek
How do I change your nav plugin to not treat every single slug with an underscore as a lang when its shows up in pages?
I thought I read this was changed to only detect valid lang strings.

I am having trouble using my enormous qa test site to test your plugin cause I have slugs like this
gen_15196045

This was not changed - the plugin assumes that normally you would use "-" instead of "_".
For the navigation structure viewer to ignore it:
  • either remove i18n_base.php, or
  • add an element <urls-to-ignore>.*_\d.*</urls-to-ignore> to data/other/i18n_settings.xml (untested)

(2014-02-11, 01:26:49)shawn_a Wrote: Also is this a bug ?
I cannot outdent (reverse of indent) the first and last items in the menu manager.

Last item: yes, it's a bug. Workaround: move item up, outdent, move back.
First item: I can't reproduce it - moving an item to first place outdents it automatically and you can't indent it. Having the second item indented and moving the first one also automatically outdents the second/now first item.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 7 Guest(s)