Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
thank You mvlcek for the answers.
user plugin: scroll to top
Reply
i'm trying to do navigation-rendering, i'm using a tutorial:
http://mvlcek.bplaced.net/get-simple/mul...-rendering

i dont want do get a component but i want get a function from php file in theme folder, how to do it ?
it's possible ?
now i using as get back a menu:
get_i18n_navigation(return_page_slug(),0,0,I18N_SHOW_LANGUAGE);

and i want to get functions from external php file, like (example)
get_i18n_navigation(return_page_slug(),0,0,I18N_SHOW_LANGUAGE, $externalfunction='theme/my_theme_name/mainmenu.php');

i'm want change a some menus to always active or always red, yellow and others... (important link menu's) and i want to change some files. i don't want to do it with componets.. it's possible to add a function (name function) to load a php file in place where is load a component?
why? i think the easier is creating something from php files.. and create a own structure of php files in my own catalogs/ php files than a creating a components where a logged user can spoil something, or change...
it's a possible ?
user plugin: scroll to top
Reply
what about using CSS for persistent styles ? every <li> has class = slug so you can style it ..
Reply
i know it.. but i want to get more .. example:
i want to get a vertical line separating the menu:
start | about us | contact
but not visible when a menu is last ...
to do it i must write a foreach and do some "if"
to do it.. i must write php code in components or.. edit a plugin i18n navigation files..
i don't want to edit a plugin files... than i must create a components... it would be easier to write a php file that replace all the contents of the menu display ...

the other idea is getting a number of submenus in menu like:
start | about us [3 pages] | contact
i have a more idea's.. but i can't load function's from a php file's...
user plugin: scroll to top
Reply
(2014-05-19, 06:33:40)xxdex Wrote: i know it.. but i want to get more .. example:
i want to get a vertical line separating the menu:
start | about us | contact
but not visible when a menu is last ...
to do it i must write a foreach and do some "if"
to do it.. i must write php code in components or.. edit a plugin i18n navigation files..
i don't want to edit a plugin files... than i must create a components... it would be easier to write a php file that replace all the contents of the menu display ...

the other idea is getting a number of submenus in menu like:
start | about us [3 pages] | contact
i have a more idea's.. but i can't load function's from a php file's...

You can do all this using CSS and a component.
But if you really want to do this in PHP, you can create a small plugin and add a function e.g. get_my_navigation(...) and use return_i18n_menu_data() to get the menu structure and then build the menu HTML.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
there is a possible to display a one language page's selected from the drop down list from language?
like:
https://dl.dropboxusercontent.com/u/4998...gs_one.jpg

now i have to much item's in menu...
https://dl.dropboxusercontent.com/u/4998...gs_all.jpg

i know there is a gsconfig:

# style flags:
# GSSTYLEWIDE = wide fluid
# GSSTYLE_SBFIXED = fixed sidemenu
#
# eg.
# define('GSSTYLE',GSSTYLE_SBFIXED);
# define('GSSTYLE',GSSTYLEWIDE);
#define('GSSTYLE',implode(',',array(GSSTYLEWIDE,GSSTYLE_SBFIXED)));

but this is little to much on one site...
what when this will be a fourth.. version?
a good idea would be to filter it.
its possible?
user plugin: scroll to top
Reply
Hello,

I'm currently making site using i18N, but I'm stuck on page url translation.
I need to have different url(slug) for same pages (like "/cs-cz/kontakty" in czech and "/us-en/contacts" in english).
I thought i could make unique pages for this, but the issue is, that if the page in default language (/cs-cz/contacts) does not exist, i can't put the english one in menus and display it at all...

Any help i can make this work?

Thank you
Reply
Lightbulb 
I am in the same situation as PiTRiS.

It seems slugs are the only area that cannot be translated with the i18n series of plugins.

The plugin seems to centrally rely on the slug to figure out content equivalencies.

Perhaps the meta keywords field could be used for that purpose instead? It's not like meta keywords are needed for anything sensible these days.

The ability to translate slugs however is important to SEO...
Reply
exactly... or use some custom field.
Reply
after install your plugin child pages of private parent page cease to save menu structure.
sorry google translate.
Reply
(2014-06-07, 05:49:30)danielg Wrote: The plugin seems to centrally rely on the slug to figure out content equivalencies.

Yes, it does. Any change to that would mean a major rebuild of the plugin and a lot of the related plugins as I18N Search and I18N Special Pages.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
There is a filter now called indexid that allows you to modify the $id or receiving slug.

http://get-simple.info/wiki/plugins:hooks_filters
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
Hi everybody,
I created a site providing two languages, german (default) and english. Switching between the two works perfect, also the naming of the menu links. But when I switch to englisch and click on a menu link it switches back to german. Beside the internationalisation plugin I'm using special pages and search plugin.
Thanks a lot
Reply
(2014-06-15, 04:02:49)shawn_a Wrote: There is a filter now called indexid that allows you to modify the $id or receiving slug.

http://get-simple.info/wiki/plugins:hooks_filters

can someone explain how to use indexid in template to get different links in different language in I18N?
user plugin: scroll to top
Reply
(2014-06-16, 15:38:02)xxdex Wrote:
(2014-06-15, 04:02:49)shawn_a Wrote: There is a filter now called indexid that allows you to modify the $id or receiving slug.

http://get-simple.info/wiki/plugins:hooks_filters

can someone explain how to use indexid in template to get different links in different language in I18N?

Truth be told I think Shawn was referring to Mvlcek's comment about having to rewrite the plugin to enable this.
Reply
(2014-06-15, 02:21:53)mvlcek Wrote:
(2014-06-07, 05:49:30)danielg Wrote: The plugin seems to centrally rely on the slug to figure out content equivalencies.

Yes, it does. Any change to that would mean a major rebuild of the plugin and a lot of the related plugins as I18N Search and I18N Special Pages.

@mvlcek: I love your plugins and the I18n plugin is usually the first one to be installed. Especially the flexibility it offers in the navigation department, plus the fact that with your plugin you have turned GS into a multi-language system: Absolutely great stuff!

Having said that the points brought up by PiTRiS and danielg are something I've run into myself too and are factors that do hinder the use of GS in a multi-language capacity.

Unique slugs for the languages in question are a must really, especially from a SEO point of view.

I do understand it would take quite a bit of work on your part but at the same time it would turn a great plugin into an absolutely brilliant one. Plus it will give GS even more possible uses.

Also with regards to PiTRiS' other point, if you can enable the option to create unique pages in non-default languages it would be a fantastic addition too. The fact that this isn't possible at this point makes things rather difficult at times. Especially when using special pages for news. The content and/or number of pages/news items/products/etc will not always be the same in every language after all.

Lastly, xxdex suggestion recently to use a dropdown or something like that to select the language in question and show its pages is a very good one and would be a good addition too. When using multiple language things get awfully crowded.
Reply
(2014-06-16, 09:40:05)hugel Wrote: Hi everybody,
I created a site providing two languages, german (default) and english. Switching between the two works perfect, also the naming of the menu links. But when I switch to englisch and click on a menu link it switches back to german. Beside the internationalisation plugin I'm using special pages and search plugin.
Thanks a lot

Removing the i18n plugins and reinstalling didn´t help. Even wehen I create new pages and link them in the menu. Can´t get the english menu links pointing to the english version pages.
Has someone an idea?
Reply
(2014-06-16, 19:49:58)hugel Wrote:
(2014-06-16, 09:40:05)hugel Wrote: Hi everybody,
I created a site providing two languages, german (default) and english. Switching between the two works perfect, also the naming of the menu links. But when I switch to englisch and click on a menu link it switches back to german. Beside the internationalisation plugin I'm using special pages and search plugin.
Thanks a lot

Removing the i18n plugins and reinstalling didn´t help. Even wehen I create new pages and link them in the menu. Can´t get the english menu links pointing to the english version pages.
Has someone an idea?

You getting a menu by:
PHP Code:
<?php
get_i18n_navigation
(return_page_slug(),0,0,I18N_SHOW_LANGUAGE);
?>
?
user plugin: scroll to top
Reply
(2014-06-16, 09:40:05)hugel Wrote: Hi everybody,
I created a site providing two languages, german (default) and english. Switching between the two works perfect, also the naming of the menu links. But when I switch to englisch and click on a menu link it switches back to german. Beside the internationalisation plugin I'm using special pages and search plugin.
Thanks a lot

(2014-06-16, 20:00:40)xxdex Wrote:
(2014-06-16, 19:49:58)hugel Wrote:
(2014-06-16, 09:40:05)hugel Wrote: Hi everybody,
I created a site providing two languages, german (default) and english. Switching between the two works perfect, also the naming of the menu links. But when I switch to englisch and click on a menu link it switches back to german. Beside the internationalisation plugin I'm using special pages and search plugin.
Thanks a lot

Removing the i18n plugins and reinstalling didn´t help. Even wehen I create new pages and link them in the menu. Can´t get the english menu links pointing to the english version pages.
Has someone an idea?

You getting a menu by:
PHP Code:
<?php
get_i18n_navigation
(return_page_slug(),0,0,I18N_SHOW_LANGUAGE);
?>
?

That works! Thanks for your help, xxdex.
Reply
Sorry yes, It was about i18n slugs. I meant that someone could essentially make a slug translation plugin, but as already mentioned it would indeed require something to store the 18n slugs and output them in menus, sitemaps, etc, then also handle converting them when the requests come in, that is where that new hook would make the last part easier.

(2014-06-16, 18:17:52)Draxeiro Wrote:
(2014-06-16, 15:38:02)xxdex Wrote:
(2014-06-15, 04:02:49)shawn_a Wrote: There is a filter now called indexid that allows you to modify the $id or receiving slug.

http://get-simple.info/wiki/plugins:hooks_filters

can someone explain how to use indexid in template to get different links in different language in I18N?

Truth be told I think Shawn was referring to Mvlcek's comment about having to rewrite the plugin to enable this.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
i think.. the better way to do it.. will be create a multimenu's structure.
example:

<?php if ($language == 'en') {
get_i18n_navigation(return_menu_slug('menu-top-en'),0,0,I18N_SHOW_LANGUAGE);
get_i18n_navigation(return_menu_slug('menu-right-en'),0,0,I18N_SHOW_LANGUAGE);
} ?>

- multimenu structure in back end-
  • [•] create, remove, delete, change name and position of multi menu
    [•] insert one page to several menu's, change it position
    [•] multi menu should have a slug for better integration with template
    [•] it will be nice when it will be load with get i18n navigation like example
    get_i18n_navigation(return_menu_slug('menu-right-en'),return_page_slug('about_us'),0,0,I18N_FILTER_MENU);
    [•] all of pages in menu should have a new special field/field's: custom class /style(this will be very eaiser to add a custom color in menu for one page item like "about us" will be have a style="color:red", or class=" have_hildreen")
    [•] start page in back-end get-simple should give a answer.. how many page's is in cms, last pages added, how many is a menu's
    which is default, how many megabytes is used by cms
    [•] add a no-folow, no-index, in page edit options
    [•] should be a "page manager" in get simple.. to view all pages.. and easy input existing page to a multi menu or several multi-menus;
I understand, than big change in get simple it would be a very hard.. and without a change of some engine's in get simple it will be impossible. it's only a ideas from space Smile for programmers..

then all of pages in other's menu will be have other slug (individual) structure.
user plugin: scroll to top
Reply
I need to display a menu with child pages of a defined parent. Unfortunately when I go with
PHP Code:
<?php get_i18n_navigation'defined-parrent-slug'2,2I18N_SHOW_PAGES ); ?>
then entries of that menu don't get a 'current' class when their corresponding pages are loaded.

I traced the issue to i18n_navigation/frontend.class.php, function getMenu(). There's this line:
PHP Code:
$currenturl $breadcrumbs$icu ]; 
.
If I change it to
PHP Code:
$currenturl return_page_slug(); 
everything seems to work correctly, breadcrumbs are working normally and menu entries get their 'current' class.

My question is what's the purpose of this line, why was it made like that and what are the consequences of my hack?
Reply
(2014-06-17, 23:22:24)Everyone Wrote: I need to display a menu with child pages of a defined parent. Unfortunately when I go with
PHP Code:
<?php get_i18n_navigation'defined-parrent-slug'2,2I18N_SHOW_PAGES ); ?>
then entries of that menu don't get a 'current' class when their corresponding pages are loaded.

I traced the issue to i18n_navigation/frontend.class.php, function getMenu(). There's this line:
PHP Code:
$currenturl $breadcrumbs$icu ]; 
.
If I change it to
PHP Code:
$currenturl return_page_slug(); 
everything seems to work correctly, breadcrumbs are working normally and menu entries get their 'current' class.

My question is what's the purpose of this line, why was it made like that and what are the consequences of my hack?

The consequence is that some multi level menus will not work correctly any more, e.g. pages that are not in the menu, but whose parent is and should be highlighted (like here) .

The correct way to show child pages is shown here (adjust depending on your hierarchy level).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
I need to call the children of certain page on that page, but ordered ALPHABETICALLY.
So, I use DynPages plugin on that page which calls component with following code and sets attribute specifying parent's slug:
Code:
<?php
global $args;
get_i18n_navigation($args['0'],2,4,'+menuOrder');
?>
this does it's job, but the menu items are not sorted alphabetically... What attribute should i use and how to apply it?

Thank you!
Reply
(2014-06-20, 16:22:20)0zz Wrote: I need to call the children of certain page on that page, but ordered ALPHABETICALLY.

The I18N plugin will always show the pages in the order they are arranged. So you would have to manually order the pages.

Or you can use the I18N Search plugin with the virtual _parent_xxx tag, see here and in the support thread.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 10 Guest(s)