Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
(2013-06-22, 17:54:47)mvlcek Wrote:
(2013-06-21, 17:58:23)Draxeiro Wrote: Lately I've had various projects needing multi-language functionality and I'm starting to run into some snags concerning the workings of the i18n plugin.

Please correct me if I am wrong here but right now creation of pages in one of the additional languages is basically linked to the default language. If the page is not there in the default language it will not show in navigation of the additional language. Correct?
[quote='Draxeiro' pid='37538' dateline='1371801503']

Yes, the default language page is always required, e.g. parent and menu order are only defined there. The idea behind the initial version of the plugin was simply
  • there are no special language links
  • if the user's language settings list any other than the default language, check if the page exists in one of these languages and display it, otherwise display the default language.

[quote='Draxeiro' pid='37538' dateline='1371801503']
...
However, in every day practise the need is definitely there to be able to create pages exclusively in the non-default language. So in other words for the languages to have separate content.

I hope this is functionality you are willing to add to your plugin. As it would make it just about perfect.

I fear this would mean rewriting most of the plugin - especially the navigation part. I'll look into it, when I have some time.
Just out of interest, could something like this be a step in the right direction? (not for the navigation, but for displaying content only existing in one language)

PHP Code:
add_action('error-404''i18n_lang_page_only'); // 3.2.1+

function i18n_lang_page_only() {
  global 
$id$data_index;
  
$page glob(GSDATAPAGESPATH.$id.'*.xml');
  if (!empty(
$page)) {
    
$page $page[0]; // takes first existing page (regardless of language)

    // get page details from XML file (using SimpleXML or XML2Array) and output them to $data_index properties
  
}

Reply


Messages In This Thread
rewrite language problem - by tomkop - 2013-03-27, 06:34:44
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
RE: Support for multilanguage sites, Internationalization (I18N) - by Angryboy - 2013-06-25, 17:12:48
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: 7 Guest(s)