Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
(2013-05-05, 15:37:16)mvlcek Wrote: The second parameter should be the parent or null. In your case it outputs the current language and the parent (both 'en').

Ohhh gracias, that explains all the problems I experienced.
Without 2nd parameter I was getting warning with missing argument 2, and I assumed it cannot be just ... NULL. It's not always possible to know the parent when pages are being moved.
(disabling error reporting with @ prefix is - you know ... not the way of fixing anything)

(2013-05-05, 12:12:16)yojoe Wrote: 2. I wanted to get a standalone link to parent (in respective language), and show it on all its slugs.
Is there maybe a builtin' function for this, rather than using below sample code ?

[quote='mvlcek' pid='36135' dateline='1367732236']
Your code gives a link to top-most ancestor (if you are on third level or below) - and the second parameter to find_i18n_url is wrong again. In general you don't need to specify the language, if it should not change.
Yes, the code was supposed to always show top parent in a tree of nested pages, regardless of currently visited slug, and also while visiting the parent page.
get_i18n_link only shows parent of current slug if the slug has any.

(2013-05-05, 15:37:16)mvlcek Wrote: If you use fancy urls, use the newest plugin version 3.1.1.

Updated, everything works fine.
Thanks again Smile
Addons: blue business theme, Online Visitors, Notepad
Reply


Messages In This Thread
rewrite language problem - by tomkop - 2013-03-27, 06:34:44
RE: Support for multilanguage sites, Internationalization (I18N) - by yojoe - 2013-05-05, 19:59:04
Enhancement suggestion - by hameau - 2013-05-12, 04:17:12
Enhancement request - by hameau - 2013-06-14, 20:02:07
RE: Enhancement request - by mvlcek - 2013-06-14, 22:04:12
RE: Enhancement request - by hameau - 2013-06-14, 23:01:36
Duplicate language cookies bug - by enzy - 2013-08-20, 07:03:26
RE: Duplicate language cookies bug - by ohayo - 2013-08-20, 18:12:25
Plugin is not shown - by tosho - 2013-09-15, 12:10:37
1000 pages limit in i18n_navigation - by titus - 2014-10-13, 21:58:36
Bug found - by lbarsov - 2014-10-17, 03:41:53
Menu with picture - by Dimi - 2015-04-28, 16:05:45
Rendering Menu in Component - by Alexander_ - 2016-05-04, 23:06:51
Meta desc for different languages - by Alexander_ - 2017-02-14, 20:29:32
Hierarchical Menus - by celextel - 2019-07-26, 16:41:47
Ri18n_navigation - by celextel - 2021-02-19, 16:07:48



Users browsing this thread: 13 Guest(s)