Support for multilanguage sites, Internationalization (I18N) - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: Support for multilanguage sites, Internationalization (I18N) (/showthread.php?tid=1221) |
Support for multilanguage sites, Internationalization (I18N) - haakoo - 2012-04-12 Hi, I'm trying to get your plugin installed and followed the rules you have set out for this('get_' script changes) but when adding the files to the plugin-folder the complete site is unreachable? Main page shows no items except for theme items and site name Trying to login is impossible? Are there certain dependencies for the installation to work or plugins that might conflict to make it not work. -GS 3.1 -Innovation theme -localtesting Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-04-13 I18N version 3.0.1:
Support for multilanguage sites, Internationalization (I18N) - AlexStarnavsky - 2012-04-13 mvlcek Wrote:I18N version 3.0.1: Thank you very much for your job! Support for multilanguage sites, Internationalization (I18N) - AlexStarnavsky - 2012-04-13 File of the Russian language, which is equipped with plug-in - is not correct. I made a complete correct translation of this plugin on the Russian language. The file is attached. Support for multilanguage sites, Internationalization (I18N) - Robzilla - 2012-04-13 Hello! I'm using i18n search for listing news on a site called "aktuell". When i try to split the news, so that only the news in the current selected language are displayed, i'm getting german (default language) news in search results too (while /?setlang=en). German news got following tags: news, german English news: news, english ... im using this code in german "aktuell": (% searchresults tags:"news german" numWords:-1 order:reverseurl HEADER: %) (% searchrss title="News RSS Feed" name="news" tags:"news german" numWords:30 %) - works fine in english "aktuell": (% searchresults tags:"news english" numWords:-1 order:reverseurl HEADER: %) (% searchrss title="News RSS Feed" name="news" tags:"news english" numWords:30 % ... no search result. With just one tag "news" i'm getting german news listed too (bad), if english laguage is selected. No english news when german is selected (fine - but useless because i'm getting german news listed while /?setlang=en). Please - need help!!! The whole site depends on multilanguage and client wants the news splitted. Thanks in advance, Rob :-) ps.: please excuse my bad english today - this issue is driving me (and my boss) mad. Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-04-14 Robzilla Wrote:Hello! The problem is that I18N Search currently uses only the tags/keywords from the default language. Instead of using a tag for the language, use the language itself: German news: Code: (% searchresults tags:"news" lang:de numWords:-1 order:reverseurl HEADER: %) English news: Code: (% searchresults tags:"news" lang:en numWords:-1 order:reverseurl HEADER: %) Make sure that the default language on the pages view is set correctly. You need to provide tags only for the default language's pages. Support for multilanguage sites, Internationalization (I18N) - Robzilla - 2012-04-16 Thank you thank you thank you!!! Rob :-) Support for multilanguage sites, Internationalization (I18N) - Rene - 2012-04-17 Hi mvlcek, Used your 'Multiple independent menus' as described here http://mvlcek.bplaced.net/multi-level-navigation/nav-multiple/ together with the navigation as a dropdown menu, great explanation & plugin! But how te set the link from the menu without dummy root pages? .htaccess? Example : from www.domain.nl/menu1/contact/ to www.domain.nl/contact/ And the active dropdown menu has no 'currentpath' class. Support for multilanguage sites, Internationalization (I18N) - Oleg06 - 2012-04-17 possible in the site settings in the field Custom Permalink Structure: specify % slug% Support for multilanguage sites, Internationalization (I18N) - Rene - 2012-04-17 @Oleg06 THX! %slug% (%slug%/ in my case) does the job ! Support for multilanguage sites, Internationalization (I18N) - Angryboy - 2012-04-18 I think I may have found a way to use your custom navigation rendering to (albeit inelegantly) patch up the problem of level 3 and lower directory links if the permalink struture is %parent%/%slug% (the problem being from GetSimple itself, not this plugin of course). For example, for this structured site: Home Menu 1 - Subdir 1-1 - - Subdir 1-1-1 - - Subdir 1-1-2 - - Subdir 1-1-3 - Menu 1-2 - Menu 1-3 Menu 2 Menu 3 The link for "Subdir 1-1-1" is "/subdir-1-1/subdir-1-1-1" instead of "menu-1/subdir-1-1/subdir-1-1-1". To fix this, with your custom rendering example (thanks again for providing this feature!), change Code: <?php echo htmlspecialchars($item->link); ?> to Code: <?php The code basically says "if the current item's parent is level X, include level X-1 in the url". The general solution for further levels is this: Code: <?php I wanted to post it here first to see if you thought it was a valid solution, mvlcek. If it is then I'll make a tutorial out of it to better explain its use and hopefully tidy up the code a bit more. Support for multilanguage sites, Internationalization (I18N) - andyash - 2012-04-21 mvlcek Wrote:yojoe Wrote:Mvlcek: does your menu plugin allow to display only slugs of a certain parent ? I am trying this but my menu doesn't show the third level child pages. I tried substituting the third parameter with null and 0 and 99 but it didn't work. <?php get_i18n_navigation("parent-url-name", 1, 0); ?> <?php get_i18n_navigation("parent-url-name", 1, null); ?> <?php get_i18n_navigation("parent-url-name", 1, 99); ?> How do I get to show my third level menu as drop down in my second level topmenu. My css is correct since if I change the second parameter to 0 it shows me the root level menu with the second level as drop downs. Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-04-21 andyash Wrote:I am trying this but my menu doesn't show the third level child pages. I tried substituting the third parameter with null and 0 and 99 but it didn't work. My previous answer was incorrect :-( The code to show all levels independent of the current page should be: Code: <?php get_i18n_navigation("parent-url-name", 1, 99, I18N_SHOW_MENU); ?> And if you want the current page/path to be marked with classes (current, currentpath), you should use the following code: Code: <?php Support for multilanguage sites, Internationalization (I18N) - andyash - 2012-04-21 This worked great. Thanks. Support for multilanguage sites, Internationalization (I18N) - Cerulean - 2012-04-27 Hi folks, My aim is to create a menu that shows the full hierarchy for the current page: all children of the current page and all parents of the current page, back to the top level parent. But not the other top level menu items that are not part of the hierarchy of the current page. Is that possible with I18N navigation plugin? Thanks. Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-04-27 Cerulean Wrote:Hi folks, Yes, you have to use custom rendering, keep track of the current menu level and only display the entries returned from return_i18n_breadcrumbs(return_page_slug()), if the level is less than that of the current page. Support for multilanguage sites, Internationalization (I18N) - Cerulean - 2012-04-27 mvlcek Wrote:Yes, you have to use custom rendering Oh wow, custom rendering is a powerful feature! Thanks for the advice. Support for multilanguage sites, Internationalization (I18N) - Draxeiro - 2012-05-02 I am currently at a bit of a loss with regards to setting up different language versions on a current project that do not contain the exact same pages. On a previous project I used <?php get_i18n_navigation(return_page_slug(), 0, 100, I18N_SHOW_LANGUAGE); ?> on the standard I18n navigation that worked perfectly in combination with a language switch to the root using ?setlang=en. Only the smaller number of pages for that language showed up after clicking the language switch link. However this site uses a pulldown menu + a 2nd independent navigation in the sidebar. Looking at Martin Vlcek's website I reasoned the correct syntax should be <?php get_i18n_navigation(return_page_slug(),0,4,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE); ?> for the pulldown menu. And <?php $bc = return_i18n_breadcrumbs(return_page_slug()); get_i18n_navigation($bc[0]['url']=='sidebar-navigatie'?return_page_slug():'sidebar-navigatie',1,99,I18N_FILTER_MENU | I18N_FILTER_LANGUAGE);?> for the sidebar menu. Yet upon switching the language it shows all the navigational links, in this case 3 German ones and the rest from the default Dutch. Which is not what I want obviously. When I click on one of the German links all the Dutch links dissappear and only the German ones remain. That is what I want! How can I make sure that when I switch the language from Dutch to German, only the actually existing German pages show up, and not the Dutch ones filling the gaps as it where? From reading Martin's explanation on his website I thought the filter method used above would do the job, but apparently not. Hope somebody can help me out with this. Thanks in advance! Support for multilanguage sites, Internationalization (I18N) - reitermarkus - 2012-05-02 Hello, I have a little problem. I have set the fancy URLs to include the %language% slug. Also I have added a htaccess rule to show the /en/ content when accessing / (without redirecting). The problem is all links obviously still contain the /en/ slug, is there a way to remove the slug for the main language? Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-05-03 reitermarkus Wrote:The problem is all links obviously still contain the /en/ slug, is there a way to remove the slug for the main language? You can also use the placeholder %nondefaultlanguage% for languages other than the default language. You have to change the rules in your .htaccess appropriately. Support for multilanguage sites, Internationalization (I18N) - Draxeiro - 2012-05-04 Have been experimenting further in the meantime, switching positions on the filters (first language, then menu), but that doesn't seem to make a difference. I switch the language using a setlanguage link that points to the homepage, so /?setlanguage=de in this case. The settings I am using on my 2 menu's are in my previous post. However instead of just showing the actually existing pages in German, it shows the german pages PLUS the default Dutch ones that aren't available in German. Subsequently clicking on a German page WILL then show only the actually available German pages but I cannot seem to make the language switch point to the just-german pages. What am I doing wrong? Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-05-05 Draxeiro Wrote:I switch the language using a setlanguage link that points to the homepage, so /?setlanguage=de in this case. The settings I am using on my 2 menu's are in my previous post. (it should rather be ?setlang=de - but see below) Draxeiro Wrote:However instead of just showing the actually existing pages in German, it shows the german pages PLUS the default Dutch ones that aren't available in German. Do you include the language in the URL? like /de/slug? If you use fancy URLs with %language% or %nondefaultlanguage%, setlang won't have an effect, as you have to use a specific language URL instead, i.e. a link /nl/slug?setlang=de would be translated by your .htaccess to /index.php?id=slug&lang=nl&setlang=de, which will show the dutch page and dutch navigation (but maybe with german menu texts?) Just use the following link instead: Code: <a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a> Support for multilanguage sites, Internationalization (I18N) - Draxeiro - 2012-05-05 mvlcek Wrote:Draxeiro Wrote:However instead of just showing the actually existing pages in German, it shows the german pages PLUS the default Dutch ones that aren't available in German. I'm not using any kind of fancy url setting (didn't know that was possible actually), so I was and am literally using /?setlang=de or index/?setlang=de (makes no difference I think) as the link to the German language pages. Did that on another site too, but there I used your regular menu code instead of the call for using a pulldown (so <?php get_i18n_navigation(return_page_slug(), 0, 100, I18N_SHOW_LANGUAGE); ?> as the menu call), and there it works like a charm: only shows the available pages in that language. But here, so far no dice, also while using your <a href="<?php echo htmlspecialchars(return_i18n_setlang_url('de')); ?>">deutsch</a> link. That yields the same result as the /?setlang=de link: showing all the pages INCLUDING the german ones. And if I then click on one of the german pages only those are left. From that previous site I just mentioned and your answer I know this should be possible but I cannot really understand what is going wrong... By the way, if I would want to use %language% or %nondefaultlanguage%? Should that be set up in the permalink field or rather somewhere in the htaccess file? Tried it in the permalink field but then it couldn't find the pages with the _de addition anymore. Support for multilanguage sites, Internationalization (I18N) - mvlcek - 2012-05-05 Draxeiro Wrote:However instead of just showing the actually existing pages in German, it shows the german pages PLUS the default Dutch ones that aren't available in German. This happens, if you switch to german on a page that does not have a german version. See http://mvlcek.bplaced.net/ (which currently works like this, but hides sub pages - I18N_FILTER_MENU | I18N_FILTER_LANGUAGE | I18N_FILTER_CURRENT):
Draxeiro Wrote:By the way, if I would want to use %language% or %nondefaultlanguage%? Should that be set up in the permalink field or rather somewhere in the htaccess file? Tried it in the permalink field but then it couldn't find the pages with the _de addition anymore. See here. Support for multilanguage sites, Internationalization (I18N) - Draxeiro - 2012-05-06 mvlcek Wrote:This happens, if you switch to german on a page that does not have a german version. Strange thing is that I had done it exactly the way you suggest and then it didn't work. As this is also the way I had done it on that other website. Just tried it again, and now it does work! However I did notice the language switch for the default language on the pages tab was suddenly back on the out-of-the-box 'de' instead of 'nl' I set and saved it to so maybe that was confusing it... In any case, things seem to work fine now. Good to know that I was basically doing everything right (with the filter commands and language switch link), but odd that it didn't seem to work initially. |