Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for multilanguage sites, Internationalization (I18N)
(2013-04-10, 02:10:43)TeeJay Wrote: Hello everyone Smile

I have a website in Czech (cs) and English (en). However, I happened to meet a few major problems I could not solve.

1) When not using custom permalinks, default language is English -wrong. I need the default to be Czech. ...

If you don't encode the language in the URL, the language will default to the user's prefered language from his browser settings. If none of the languages matches, it will default to the default language (the pages without _xx in the slug).

(2013-04-10, 02:10:43)TeeJay Wrote: 2) When using these custom permalinks showing all the languages, to the admin panel I wrote

...

Everythings works as it is supposed be, except news from News Manager. You can see News Manager lines (starting with "clanky", "clanky" is my menu tam with news from News Manager), which are there for Fancy URLs (you can use Fancy URLs and News Manager without these lines in .htaccess). What should I add or change about the News Manager lines to make it work with this plugin and Fancy URLs?

Please ask this question in the News Manager thread. I don't know the News manager and its support for multiple languages.

(2013-04-10, 02:10:43)TeeJay Wrote: 3) When using custom permalinks showing only the secondary language, in the admin panel I wrote
Code:
%nondefaultlanguage%/%parent%/%slug%/
and changed .htaccess like this:
Code:
...

# To make custom permalinks with the secondary language only work :)
RewriteRule ^/?$ cs/ [R,L]   # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]

Looks fine.

(2013-04-10, 02:10:43)TeeJay Wrote: In this case, everything was wrong. On the title page, it was okay and Czech, correctly switchable into both languages back and forth. However, after clicking onto any menu tab or submenu tab, the language changed into English and couldn't be changed even with my language switching menu (which is:
Code:
<a class="en<?php if ($language == "en") echo "-current"; ?>" href="<?php echo htmlspecialchars(return_i18n_setlang_url('en')); ?>" title="English"></a>
          <a class="cz<?php if ($language == "cs") echo "-current"; ?>" href="<?php echo htmlspecialchars(return_i18n_setlang_url('cs')); ?>" title="Czech"></a>
What is funny about this menu - although the option of English is states first in the HTML code, it shows on the right side of its div. It's a CSS/HTML thing though.) The only menu tab where I can switch language is the index page, it just doesn't work anywhere else.

If you are using Chrome, you need to have a favicon.ico in your root directory (see first post in this thread).
Otherwise I can't tell without a link to your site.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
rewrite language problem - by tomkop - 2013-03-27, 06:34:44
RE: Support for multilanguage sites, Internationalization (I18N) - by mvlcek - 2013-04-10, 04:47:21
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: 15 Guest(s)