(2013-05-26, 19:43:12)mvlcek Wrote: For the links in the backend ('#', 'view') the language must be included in the URL as otherwise you might see the wrong language (depending on your browser settings).
But if it's a single language site (where I18N is used just because of its non-language-related features like the advanced navigation/multilevel structure/etc.), there's not a wrong language - there's only one. So the lang parameter could be suppressed.
It's not a big issue anyway.
I'm just reporting because I found this while testing News Manager 2.4+ support for I18N permalink structures in the backend (NM's own '#', 'view' links for posts)
This is how I'm currently doing:
Code:
if (function_exists('find_i18n_url')) // I18N?
$url = find_i18n_url($NMPAGEURL, nm_get_parent(), return_i18n_default_language());
// ... else find_url is used
When I found that with normal structures (only %parent% %slug% or non-fancy) the lang parameter was added (as I say, only in backend) I was going to fix it like this:
Code:
if (function_exists('find_i18n_url') &&
count(return_i18n_available_languages()) > 1) // I18N multilanguage?
$url = find_i18n_url($NMPAGEURL, nm_get_parent(), return_i18n_default_language());
// ... else find_url is used
Before doing it, I decided to ask. :-) But maybe I'll leave like it is - no big issue.