Posts: 51
Threads: 3
Joined: Jul 2013
Hey,
is it possible that my problem above with the missing classes comes from using a static start slug?
<?php get_i18n_navigation('index', 0, 0, I18N_OUTPUT_MENU | I18N_FILTER_MENU, 'mainmenu') ?>
It's the only thing I can think off. Is there a way to get classes in that case or how can I work around the problem?
Thanks a lot for any hints!
Cheers,
Tom
Posts: 2,094
Threads: 54
Joined: Jan 2011
(2013-08-21, 07:01:42)Thomas Helzle Wrote: Hey,
is it possible that my problem above with the missing classes comes from using a static start slug?
<?php get_i18n_navigation('index', 0, 0, I18N_OUTPUT_MENU | I18N_FILTER_MENU, 'mainmenu') ?>
The first parameter should be the current page - if you set it to a fixed value, the plugin assumes that this (here the index page) is the current page and sets the classes accordingly.
Posts: 51
Threads: 3
Joined: Jul 2013
Hey mvlcek,
that is good to know.
I think I misunderstood something basic then - somehow I thought I would use a static page as the first parameter when the menu should be page-independent.
In the meantime I found the current page with php by comparing the page slug with the classes the $item returns (which in that case is just the slug of each page).
But now it makes sense. I'll give it a try.
Cheers and thanks!
Tom
Posts: 6
Threads: 3
Joined: Nov 2012
Hi Mvlcek,
I had a problem with language cookies mainly when switching languages more than once.
In latest Chrome I got that more than one 'language' cookie was being sent to the page (clearing cookies first).
Don't know why happens but I could solve it by replacing
Code: setcookie(I18N_LANGUAGE_COOKIE, $_GET[I18N_SET_LANGUAGE_PARAM]);
with
Code: setcookie(I18N_LANGUAGE_COOKIE, $_GET[I18N_SET_LANGUAGE_PARAM], time()+60*60*24*30, '/', $_SERVER['HTTP_HOST']);
in frondend.class.php
Regards,
Mauro.
Posts: 3
Threads: 0
Joined: Aug 2013
2013-08-30, 07:47:31
(This post was last modified: 2013-08-30, 08:12:29 by MaxShy.)
Hello all, please help, usage plagin "I18n, i18n_base", on one site I found a way to display all levels of nesting Url in the address bar of the browser,
Quote:admin panel -> settings -> Custom Permalink Structure: = %parents%/%slug%/
and usage menu
Code: <?php get_i18n_navigation(return_page_slug(),0,5,I18N_SHOW_MENU); ?>
all worked fine until I saw the sitemap
Code: ...
<url><loc>http://domain_name/%parents%/about-us/</loc><lastmod>2013-06-27T11:42:20+00:00</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>
...
url must be http://domain_name/about-us/
sorry for my english.
Posts: 206
Threads: 7
Joined: Mar 2013
2013-09-05, 21:42:11
(This post was last modified: 2013-09-05, 21:42:29 by TeeJay.)
Hi Mvlcek,
I'm having troubles with the submenu (and its links) on the homepage - index.
The URLs created by the submenu look like this
Code: http://tomasjanecek.cz/index/some-subpage/
However, I need them to be like this
Code: http://tomasjanecek.cz/home/some-subpage/
or
http://tomasjanecek.cz/some-subpage/
I don't have any subpages somewhere else than on the homepage but I'm planning them, so I can't ruin the structure totally.
So far I redirected the pages with /index/ to the same URL just without the /index/ word, but it's not enought as the links in the menu still include /index/.
Code: RewriteRule ^index/(.+)$ $1 [R=302,QSA,L]
Is there any way to change the menu URLs (links) on the homepage without making it static on the homepage?
All I need is to remove or change the /index/ from the links in the submenu on the homepage only, nothing more.
Thank you
Posts: 2
Threads: 1
Joined: Sep 2013
Help,
can `t deal with navigation
when writing:
Code:
<? php get_i18n_navigation (return_page_slug ());?>
Nothing appears
when writing:
Code:
<? php get_i18n_navigation (return_page_slug (), 1,99);?>
too
recording only
Code:
<? php get_i18n_navigation (return_page_slug (), 0,0);?>
menu appears on the upper level, but if the menu is in another language, it still sends the page to the language of the system
example
if there are two languages EN and _DE, then the top entry on the menu language _DE get on EN
and I want to output a second level menu
record
Quote:
<? php get_i18n_navigation (return_page_slug (), 1,1);?>
does not work
Posts: 3,491
Threads: 106
Joined: Mar 2010
Are you using exactly the codes you have posted?
If so, PHP opening tags should be <?php, not <? php (without the space)
Posts: 5
Threads: 1
Joined: Aug 2013
2013-09-15, 12:10:37
(This post was last modified: 2013-09-15, 12:11:14 by tosho.)
Hi,
I just downloaded, unzipped and placed the plugin in the plugin folder, but it does not show up in GetSimple "plugins" page.
If I change get_navigation, get_component, and get_header to the i18n versions, I will simply get a "not found" .
The plugin directory looks like this:
Code: i18n (DIR)
+-- i18n_base (DIR)
+-- i18n_base.php
+-- i18n_navigation (DIR)
+-- i18n_navigation.php
What's wrong?
Posts: 3,491
Threads: 106
Joined: Mar 2010
Those files and folders should be directly unzipped into the plugins directory, not inside a i18n folder. Like this:
Code: yoursite
+-- plugins (DIR)
+-- i18n_base (DIR)
+-- i18n_base.php
+-- i18n_navigation (DIR)
+-- i18n_navigation.php
Posts: 5
Threads: 1
Joined: Aug 2013
Thanks a lot, Carlos,
I thought that the whole directory had to be be copied into the plugins directory as with my other two plugins.
Posts: 2
Threads: 0
Joined: Jun 2013
Help me, please
I cant solve a problem with multilanguage:
My site has 2 languages, basic (en) and additional (de). Basic fancy urls must be without any suffix(for example http://mysite.com/page/), additional - with suffix "/de" (for example http://mysite.com/de/page/). If user's browser language is the same that basic, it's OK, but if not, all pages without suffix transform in german.
It's because urls has "lang" parameter only if i switch language. Modrewrite transforms urls without this parameter to default browser language. How to make urls to include "lang" parameter always? In this case it will be possible to set unique url to each language version
Posts: 206
Threads: 7
Joined: Mar 2013
2013-09-17, 03:59:09
(This post was last modified: 2013-09-17, 04:00:16 by TeeJay.)
(2013-09-17, 01:15:54)anvold Wrote: Help me, please
I cant solve a problem with multilanguage:
My site has 2 languages, basic (en) and additional (de). Basic fancy urls must be without any suffix(for example http://mysite.com/page/), additional - with suffix "/de" (for example http://mysite.com/de/page/). If user's browser language is the same that basic, it's OK, but if not, all pages without suffix transform in german.
It's because urls has "lang" parameter only if i switch language. Modrewrite transforms urls without this parameter to default browser language. How to make urls to include "lang" parameter always? In this case it will be possible to set unique url to each language version
I have already made a website with the same scenario you are after.
http://ubytovanisetek.cz/ - the default language is Czech and it's Czech until you switch to English. Then, it stays English until you switch back. When the site's in English, there's "/en/" in the URL. When it's in Czech, there is no parameter.
In the website's settings, I use this custom permalink structure:
Code: %nondefaultlanguage%/%parent%/%slug%/
And the .htaccess part for this setting (you have to replace the original RewriteRules with this one)
Code: 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=cs [QSA,L]
Try it, it should work.
Posts: 423
Threads: 15
Joined: Mar 2011
Hello,
The sitemap generator in I18N Base gives a confusing message on completion, when GSDONOTPING is defined: "Sitemap Created, however there was an error pinging one or more of the search engines".
See this thread.
--
Nick.
Posts: 166
Threads: 24
Joined: Jul 2012
I know Connie has asked this question but I've gone through writing up some code...with some help. I'm hoping I don't have to rewrite. I need some of the top most menu items not to have a link. I'm using custom rendering to do this for some of the child menu items.
Currently I have a component called links
PHP Code: <li class="<?php echo $item->classes; ?>"> <?php if ($item->nopage == 'noLink') { echo htmlspecialchars($item->text); } elseif ($item->nopage == 'hasLink') { ?> <a href="<?php echo htmlspecialchars($item->link); ?>"> <?php echo htmlspecialchars($item->text); ?> </a> <?php } else { ?> <a href="<?php echo htmlspecialchars($item->link); ?>"> <?php echo htmlspecialchars($item->text); ?> </a> <?php }?> <?php if ($item->isOpen) { ?> <ul class="sub-menu"><?php $item->outputChildren(); ?></ul> <?php } ?> </li>
I'm using this in the navigation to print out the main li and its children in a div
PHP Code: <li><?php get_i18n_link('investment-strategies'); ?> <div class="menu_dropdown_block full_width"> <ul><?php get_i18n_navigation('investment-strategies',1,100,I18N_SHOW_MENU, links); ?></ul> </div> </li>
I really need investment strategies - the parent not to be a link
I know I'm using the get_i18n_link but what else is there??
Not sure where to begin with this Please HELP this php noob!!!
Posts: 11
Threads: 1
Joined: Aug 2013
Is there a way to to alter the url in the navigation? Right now all the navigation links are to the pages in the local server (localhost:8888).
When I upload the pages to the remote server, it keeps the links to my local server). So I can't get it to work from the remote server.
Posts: 185
Threads: 8
Joined: Apr 2012
2013-10-02, 17:10:25
(This post was last modified: 2013-10-02, 17:11:24 by morvy.)
(2013-10-02, 16:53:05)belotte Wrote: Is there a way to to alter the url in the navigation? Right now all the navigation links are to the pages in the local server (localhost:8888).
When I upload the pages to the remote server, it keeps the links to my local server). So I can't get it to work from the remote server.
try to flush cache / delete cache files (but be sure that you have new url set in settings )
Posts: 166
Threads: 24
Joined: Jul 2012
As always the plugins mvleck develops truly rock!
Is there a way to turn of the name generator and keep the canonical url?
if I set the get_il8n_header(FALSE); it removes both generator and canonical.
Last question. Is that ?lang-en on the end of the canonical url proper? Do I need it?
many thanks
Lance
Posts: 2,094
Threads: 54
Joined: Jan 2011
2013-10-10, 01:05:07
(This post was last modified: 2013-10-10, 01:05:29 by mvlcek.)
(2013-10-10, 00:50:09)lnickel Wrote: As always the plugins mvlcek develops truly rock!
Thank you.
(2013-10-10, 00:50:09)lnickel Wrote: Is there a way to turn of the name generator and keep the canonical url?
if I set the get_il8n_header(FALSE); it removes both generator and canonical.
[
No, but you can remove line 219 in plugins/i18n_base/frontend.class.php (echo '<meta ...).
(2013-10-10, 00:50:09)lnickel Wrote: Last question. Is that ?lang-en on the end of the canonical url proper? Do I need it?
If you have multiple languages and the language is not included in the URL itself, you would need it.
If the URL includes the language, there should be no lang parameter.
If you have only one language, you can include in gsconfig.php:
Code: define('I18N_SINGLE_LANGUAGE',true);
(which should remove the language parameter)
Posts: 185
Threads: 8
Joined: Apr 2012
2013-10-10, 01:06:40
(This post was last modified: 2013-10-10, 01:09:23 by morvy.)
do you feel ashamed by that generator ? you can comment it in source code btw
the lang parameter in canonical url is needed when the page is multilingual. I don't understand why it's there even with multilanguage turned off in gsconfig
EDIT: I see that you are faster mvlcek, but I have multilanguage turned off on my page and I see that parameter in url :/ (on multiple sites, but not all, I don't understand this behaviour)
Posts: 166
Threads: 24
Joined: Jul 2012
2013-10-10, 01:19:31
(This post was last modified: 2013-10-10, 01:25:25 by lnickel.)
hahaha! no I'm not ashamed LOL!!! thanks morvy and mvleck for the responses!!!
Yeh I only have one language which is english. LOL!!!
EDIT** Perfect both solutions work.
Posts: 218
Threads: 59
Joined: May 2013
2013-10-13, 01:01:42
(This post was last modified: 2013-10-13, 01:02:25 by phpman.)
Hi @ll,
i have problem with the I18N Plugin.
Now I´ve create a multilanguage site with DE & EN content.
First of all okay (menue shows "DE" => DE entries) and if (menue shows "EN" => EN entries)
But as soon as i switch between the menue entries i got a problem.
Some pages are "DE" shown and some in the De Menue shows EN sides the same in the other direction
(EN --> shows DE)
Have a look here side
Anyone has a idea whats wrong?
Posts: 185
Threads: 8
Joined: Apr 2012
hmm, I don't have that problem, looking at your site and every english menu item shows english page, same for DE
Posts: 2,094
Threads: 54
Joined: Jan 2011
I18N version 3.2.4:- fixes a bug that prevents correct language switching - the language cookie is now always set to the root of the domain (@phpman)
- adds a new parameter to get_i18n_header($full, $omit), where $omit is an array with the tags to omit, e.g. get_i18n_header(true,array('generator')) will omit the generator meta tag (@lnickel)
Posts: 218
Threads: 59
Joined: May 2013
2013-10-13, 01:54:27
(This post was last modified: 2013-10-13, 01:55:00 by phpman.)
Hi,
thank for the fix but another issue we have like a bug ?
I´ve open another thread for this and if i use the new fixed file from the last posting see here it works.
Did you fix this too ? posting fix
Harald
|