Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
(2013-03-19, 02:03:28)tomkop Wrote: but please .. how i display all navigation ? this is for one item, but ?
thanks !

(2013-03-19, 01:57:09)mvlcek Wrote: [quote='tomkop' pid='34457' dateline='1363557589']
i need add image(s) to navigation item. Its possible ? for example combinate with I18N customfields ?

Create a component, e.g. named 'entrywithicons' as described above and add the name of the component as 5th parameter to the get_i18n_navigation function as desribed on the custom rendering page.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-03-19, 02:14:27)mvlcek Wrote:
(2013-03-19, 02:03:28)tomkop Wrote: but please .. how i display all navigation ? this is for one item, but ?
thanks !

(2013-03-19, 01:57:09)mvlcek Wrote: [quote='tomkop' pid='34457' dateline='1363557589']
i need add image(s) to navigation item. Its possible ? for example combinate with I18N customfields ?

Create a component, e.g. named 'entrywithicons' as described above and add the name of the component as 5th parameter to the get_i18n_navigation function as desribed on the custom rendering page.

Thank you very much !!!
Reply
(2013-03-19, 02:03:28)tomkop Wrote: Thank you very much ..
but please .. how i display all navigation ? this is for one item, but ?
thanks !

did you read the information and suggestions at the plugins homepage?

http://mvlcek.bplaced.net/get-simple/mul...avigation/

please read that and find if it helps you with some ideas!

(2013-03-17, 17:33:45)Connie Wrote: Warning: Invalid argument supplied for foreach() in /var/www/web10/html/getsimple/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4

mvlek, I have this problem with a component at get-simple.de
the complete error + the component are in the first post...

do you have an idea what is wrong? Please help me out ;=)

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Martin, please help me

I have the error on the german get-simple.de-website and I need help.
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
(2013-03-19, 17:16:02)Connie Wrote:
(2013-03-17, 17:33:45)Connie Wrote: Warning: Invalid argument supplied for foreach() in /var/www/web10/html/getsimple/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4

mvlek, I have this problem with a component at get-simple.de
the complete error + the component are in the first post...

do you have an idea what is wrong? Please help me out ;=)

This has nothing to do with I18N, but it's simply an error in your component: you use foreach on something, which is not a list.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
(2013-03-19, 02:14:27)mvlcek Wrote:
(2013-03-19, 02:03:28)tomkop Wrote: but please .. how i display all navigation ? this is for one item, but ?
thanks !

(2013-03-19, 01:57:09)mvlcek Wrote: [quote='tomkop' pid='34457' dateline='1363557589']
i need add image(s) to navigation item. Its possible ? for example combinate with I18N customfields ?

Create a component, e.g. named 'entrywithicons' as described above and add the name of the component as 5th parameter to the get_i18n_navigation function as desribed on the custom rendering page.

Hello,
its good solution but .. see http://caspro.esenti.eu/subdom/caspro/te...sortiment/

this show same menuicon for current page but not for each navigation item.
any solutions ? :/

<?php get_i18n_navigation('sortiment',1,9,$show=I18N_SHOW_NORMAL,$component=entrywithicons); ?>
Reply
(2013-03-21, 23:04:52)mvlcek Wrote:
(2013-03-19, 17:16:02)Connie Wrote:
(2013-03-17, 17:33:45)Connie Wrote: Warning: Invalid argument supplied for foreach() in /var/www/web10/html/getsimple/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4

mvlek, I have this problem with a component at get-simple.de
the complete error + the component are in the first post...

do you have an idea what is wrong? Please help me out ;=)

This has nothing to do with I18N, but it's simply an error in your component: you use foreach on something, which is not a list.
how is it possible? It worked since we started the website and now it doesn't work anymore

I have no brain in the moment to find that error, will deactivate it... unfortunately
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
(2013-03-17, 17:33:45)Connie Wrote:
Quote: Warning: Invalid argument supplied for foreach() in /var/www/web10/html/getsimple/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4

[...]

this happens when using this component:
{% auszuege-subseiten %}

which contains:
PHP Code:
<?php
$subpages 
return_i18n_menu_data(return_page_slug(), 22I18N_SHOW_NORMAL);

foreach (
$subpages as $slugexcerpt) {
echo  
'<h2>'.$slugexcerpt['title'].'</h2>';
echo 
page_excerpt(''.$slugexcerpt['url'].'',200);
}
?>

Looks like $subpages is assigned NULL for some reason.

To prevent this script breaking your page when this happens, change the foreach line by:
Code:
if ($subpages) foreach ($subpages as $slugexcerpt) {
Reply
(2013-03-22, 05:17:28)Carlos Wrote: Looks like $subpages is assigned NULL for some reason.
To prevent this script breaking your page when this happens, change the foreach line by:
Code:
if ($subpages) foreach ($subpages as $slugexcerpt) {

Thanks!
now the error is gone and as I also modified min- and max-level to tease the system, I get now excerpts of the subpages, which didn't show up before...
(I wonder how this could have worked before..., but ok ...)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Guys, how to do multilevel url relative to navigation? site.com/lvl1/lvl2/lvl3/lvl4, not site.com/lvl3/lvl4 Please, it is urgent for me.
Reply
(2013-03-22, 00:14:59)tomkop Wrote:
(2013-03-19, 02:14:27)mvlcek Wrote:
(2013-03-19, 02:03:28)tomkop Wrote: but please .. how i display all navigation ? this is for one item, but ?
thanks !

(2013-03-19, 01:57:09)mvlcek Wrote: [quote='tomkop' pid='34457' dateline='1363557589']
i need add image(s) to navigation item. Its possible ? for example combinate with I18N customfields ?

Create a component, e.g. named 'entrywithicons' as described above and add the name of the component as 5th parameter to the get_i18n_navigation function as desribed on the custom rendering page.

Hello,
its good solution but .. see http://caspro.esenti.eu/subdom/caspro/te...sortiment/

this show same menuicon for current page but not for each navigation item.
any solutions ? :/

<?php get_i18n_navigation('sortiment',1,9,$show=I18N_SHOW_NORMAL,$component=entrywithicons); ?>

mlvcek please .. any ideas ? thank you very much ..
Reply
(2013-03-24, 20:38:11)tomkop Wrote: its good solution but .. see http://caspro.esenti.eu/subdom/caspro/te...sortiment/
this show same menuicon for current page but not for each navigation item.
any solutions ? :/

<?php get_i18n_navigation('sortiment',1,9,$show=I18N_SHOW_NORMAL,$component=entrywithicons); ?>

[/quote]

My error: return_custom_field only returns the field for the current page. You should rather use the GetSimple caching functions, e.g.:
Code:
<li class="<?php echo $item->classes; ?>">
  <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php if (returnPageField($item->slug, 'menuicon')) { ?>
      <img src="<?php echo htmlspecialchars(returnPageField($item->slug, 'menuicon')); ?>"/>
    <?php } ?>
    <?php echo htmlspecialchars($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-03-24, 22:56:34)mvlcek Wrote:
(2013-03-24, 20:38:11)tomkop Wrote: its good solution but .. see http://caspro.esenti.eu/subdom/caspro/te...sortiment/
this show same menuicon for current page but not for each navigation item.
any solutions ? :/

<?php get_i18n_navigation('sortiment',1,9,$show=I18N_SHOW_NORMAL,$component=entrywithicons); ?>

My error: return_custom_field only returns the field for the current page. You should rather use the GetSimple caching functions, e.g.:
Code:
<li class="<?php echo $item->classes; ?>">
  <a href="<?php echo htmlspecialchars($item->link); ?>">
    <?php if (returnPageField($item->slug, 'menuicon')) { ?>
      <img src="<?php echo htmlspecialchars(returnPageField($item->slug, 'menuicon')); ?>"/>
    <?php } ?>
    <?php echo htmlspecialchars($item->text); ?>
  </a>
  <?php if ($item->isOpen) { ?>
    <ul><?php $item->outputChildren(); ?></ul>
  <?php } ?>
</li>
[/quote]

thank you very much .. you are the best.
i donate your over your webpage .. thanx
Reply
(2013-03-23, 02:23:11)artmaxi Wrote: Guys, how to do multilevel url relative to navigation? site.com/lvl1/lvl2/lvl3/lvl4, not site.com/lvl3/lvl4 Please, it is urgent for me.

Why do you ignore me, gentlemen?
Reply
I told you that the problem is not in the plugin, but in CMS Smile
Reply
(2013-03-25, 21:00:27)Oleg06 Wrote: I told you that the problem is not in the plugin, but CMS Smile

Ok, but I'm asking about how to fix it? Is it possible to fix or to do something for creating correct URLs?
Reply
Ask your question here http://get-simple.info/forums/forumdisplay.php?fid=7
Reply
(2013-03-25, 21:43:01)Oleg06 Wrote: Ask your question here http://get-simple.info/forums/forumdisplay.php?fid=7

Ok thanks!
Reply
Hey all,

I've just started to use this plugin, but I think I did something wrong. I have installed the plugin and followed every step, but the result isn't very eyepleasing...

I'd like to achieve something like this: http://yoga-center.org/CMS/

That menu drops down when the mouse pointer is on it. Problem with my current menu:

[Image: GFa3SCT.png]

It really screws up everything when I click it and it doesn't drop down when my pointer is on it. Can this be fixed?
Reply
Hello, i have

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

in admin permalink
%language%/%parent%/%slug%/

but this line in rewrite is problem:
RewriteRule ^(sk|hu|cz|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]

500 Internal server error.
on the other server it works ..
is there any way to fix it otherwise?

url si http://domain.sk/prietokomery/sk/sortiment/
not http://domain.sk/sk/sortiment/
can be a problem?
thanx you
Reply
(2013-03-27, 01:13:39)CKnl Wrote: Hey all,

I've just started to use this plugin, but I think I did something wrong. I have installed the plugin and followed every step, but the result isn't very eyepleasing...

I'd like to achieve something like this: http://yoga-center.org/CMS/

That menu drops down when the mouse pointer is on it. Problem with my current menu:

[Image: GFa3SCT.png]

It really screws up everything when I click it and it doesn't drop down when my pointer is on it. Can this be fixed?

As far as I know, that is a CSS problem rather than with the plugin itself. You'll need to define some CSS rules to achieve your result. It typically involves the sub-menus hidden until the main menu is hovered over, and aligning the sub-menu (using paddings and margins) so that it is be directly below the main menu.
Reply
Hello.
I made a horizontal site menu and some of the pages have a submenu. I did that with Child Menu plugin and I couldn't sort it, so I started using this plugin.
However, there is a little problem. If the submenu has any content, it's ok. But if there is no content in the submenu, there is still visible an empty div (it has a background). I didn't have this problem with Child Menu and I don't know why.
How can I make the submenu (including the wrapper - div, nav and ul) visible only when there is a content of the submenu?
For illustration here you are a screenshot of the full (upper part of the image) and empty div (lower part of the image). I want the div for submenu hidden if there is no menu inside. Look at it here http://i50.tinypic.com/dw85t3.png

The code of the submenu is here:
Code:
<div id="c_subMenu">            
  <nav>                    
    <ul>                        
      <?php
      $bc = return_i18n_breadcrumbs(return_page_slug());
      $slug = $bc[0]['url'];
      $pages = return_i18n_pages();
      if (@$pages[$slug]['children']) {
        echo '<h3>'.$bc[0]['menu'].'</h3>';
        echo '<ul class="sidemenu">';
        get_i18n_navigation(return_page_slug(),1,1);
        echo '</ul>';
      }
            ?>        
    </ul>              
  </nav>          
</div>

I don't mind using much more simple code for the submenu, which is:
Code:
<div id="c_subMenu">            
  <nav>                    
    <ul>                        
      <?php get_i18n_navigation(return_page_slug(),1,1); ?>                    
    </ul>              
  </nav>          
</div>

Thank you for you help, it's much appreciated. I saw some jquery ideas about this, but I prefer not using jquery. Furthermore, I'm not able to use it correctly :/


Edit:// Found the solution myself after careful looking at the code... Smile I just edited the code for the submenu so that the function generated everything including the <div id="c_subMenu"> Smile
Code:
<?php
$bc = return_i18n_breadcrumbs(return_page_slug());
$slug = $bc[0]['url'];
$pages = return_i18n_pages();
if (@$pages[$slug]['children']) {
  echo '<div id="c_subMenu">';
    echo '<nav>';
      echo '<h3>'.$bc[0]['menu'].'</h3>';
        echo '<ul class="sidemenu">';
          get_i18n_navigation(return_page_slug(),1,1);
        echo '</ul>';        
    echo '</nav>';
  echo '</div>';
}
?>
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
this is how we did it at get-simple.de, just for spreading the wisdomm ;=)
PHP Code:
<?php

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

            echo 
'<div class="section">';
            echo 
'<h2>sfkölafk ÃƒÂ¶ÃƒÂ¶ds dslölöf</h2>';
            echo 
'<ul>';
            
get_i18n_navigation(return_page_slug(),1,10);
            echo 
'</ul>';
            echo 
'</div>';

        }
    
?>
that's how I did it on many pages... it will only start the section-div if there is content ...
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Thank you for your answer, Connie.
Yes, this is a perfect solution as I already figured out yesterday after a few hours; next time I will try more before posting.
Thanks anyway for your help Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Hello everyone Smile

I have a website in Czech (cs) and English (en). However, I happened to meet a few major problems I could not solve.

1) When not using custom permalinks, default language is English -wrong. I need the default to be Czech. So I wrote into .htaccess
Code:
RewriteRule ^/?$ cs/ [R,L]
Apparently, it didn't help, I understand that it's because it just adds /cs/ into the address. How can I make it Czech as a default language when not using permalinks? I just want to visit my site and have it in Czech without switching.

2) When using these custom permalinks showing all the languages, to the admin panel I wrote
Code:
%language%/%parent%/%slug%/
and set .htaccess like this
Code:
# News Manager setup:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager

# To make custom permalinks with both languages work :)
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9-]+)/?$ index.php?id=$1 [QSA,L]
Everythings works as it is supposed be, except news from News Manager. You can see News Manager lines (starting with "clanky", "clanky" is my menu tam with news from News Manager), which are there for Fancy URLs (you can use Fancy URLs and News Manager without these lines in .htaccess). What should I add or change about the News Manager lines to make it work with this plugin and Fancy URLs?

3) When using custom permalinks showing only the secondary language, in the admin panel I wrote
Code:
%nondefaultlanguage%/%parent%/%slug%/
and changed .htaccess like this:
Code:
# News Manager setup:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
# end News Manager

# To make custom permalinks with the secondary language only work :)
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]
In this case, everything was wrong. On the title page, it was okay and Czech, correctly switchable into both languages back and forth. However, after clicking onto any menu tab or submenu tab, the language changed into English and couldn't be changed even with my language switching menu (which is:
Code:
<a class="en<?php if ($language == "en") echo "-current"; ?>" href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>" title="English"></a>
          <a class="cz<?php if ($language == "cs") echo "-current"; ?>" href="<?php echo htmlspecialchars(return_i18n_setlang_url('cs')); ?>" title="Czech"></a>
What is funny about this menu - although the option of English is states first in the HTML code, it shows on the right side of its div. It's a CSS/HTML thing though.) The only menu tab where I can switch language is the index page, it just doesn't work anywhere else.
Futhermore, the news ("clanky") didn't work as in the second case.

My question is, how can I make all these three things working properly? Well, I would like to use the third option the most - for Czech a standard address without /language/ in the address, for English /en/.
I would also like to have translated the address of the web in English version according to the new translated Menu labels and translated page titles, but firstly I need to make it work at all.

Thanks for helping me. I'm willing to provide all the information needed and try your kind suggestions. I don't know what do write in .htaccess because I don't understand what to write in there.

Tom
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply




Users browsing this thread: 9 Guest(s)