2011-09-25, 01:53:20
I'm sorry, take care of the Denver
Support for multilanguage sites, Internationalization (I18N)
|
2011-09-25, 01:53:20
I'm sorry, take care of the Denver
2011-09-25, 02:37:14
(This post was last modified: 2011-09-25, 03:00:28 by Caufield170.)
Thanks for the fix, but, switching languages on the index page still doesn't work.
When on the index page, URLs for page switching show example.com/de/ (for Detusch) and example.com/en/ (for English). Clicking any of those returns a 404 page not found. It does work if I replace this code in frontend.class.php (lines 252-257) Code: if ((string) $slug && $slug != 'index') { with this Code: if ((string) $slug) { Now, another question - how to make visiting example.com auto-redirect to example.com/de/index? I know it has something to do with adding a rule to .htaccess file, but not sure how to apply it. Thanks for the excellent and fast support. EDIT: Thinking about this a little more, it would be best to not show default language in the URL at all (only show the language part of the URL if translation to another language is requested). Something like this would do the trick (also in frontend.class.php) Where it says Code: $plink = str_replace('%language%', $lang, $PERMALINK_ORIG); I have replaced with Code: $deflang = return_i18n_default_language();
2011-09-25, 03:01:21
dizarter Wrote:Thanks for the fix, but, switching languages on the index page still doesn't work. You are probably missing a rule in .htaccess. Try this: Code: RewriteRule ^/?$ en/ [R,L] # redirect to language of your choice Code: RewriteCond %{REQUEST_FILENAME} -f [OR] dizarter Wrote:Now, another question - how to make visiting example.com auto-redirect to example.com/de/index? See the examples above.
2011-09-25, 03:18:33
Yes, thank you, I missed the .htaccess part completely.
One more suggestion, it's easy to implement. It has to do with having all pages in default language displayed without the language prefix while translated versions of those pages do get the language prefix Code: $deflang = return_i18n_default_language(); This is useful for me, because I already have my pages without the language indexed on google, and adding the same pages with language prefix would probably penalize my rank because of having duplicate content (multiple URLs resolving to the sam content page). mvlcek Wrote:dizarter Wrote:Thanks for the fix, but, switching languages on the index page still doesn't work.
2011-09-25, 03:40:02
And yet another suggestion - is it possible to make the plugin work with "Generate Sitemap" under "Theme"?
The %language% placeholder is not recognized and is output "as is" in the resulting XML. Thanks once again for the excellent support.
2011-09-28, 10:48:49
Quote:One more suggestion, it's easy to implement. I had a very similar problem with dizarter. From the SEO point of view, must agree that default language index page should look like www.domain.com not www.domain.com/en/ I was upgrading a site from static to GetSimple powered and transposing the existing multilanguage ULRs to I18N plugin. The site allready has PR2 on mainpage domain , and redirecting the frontpage http://www.pensiuneahanna.ro/ to http://www.pensiuneahanna.ro/ro/ (romanian as default language) was risky with google SR and PR. I think that default language index page should be treated exactly like GetSimple does, it is left with no parameter. The "auto" language based on user preferences and session vars, is NOT Seo friendly, unfortunately. I had to hack getFancyLanguageUrl() function to make my ulr look like old urls. (witch I am not happy with) And Last: It is a god practice (a must SEO practice) that on multilanguage sites, to use multilanguage slug urls. Using slug to identify coresponding pages, makes this imposible. It would be a chalange to find a solution to this. I know this sounds somehow "demanding" but I have noticed that you are realy preoccupied with I18N system, and the plugin is realy so perfect, that it's a pity to neglect the fancy url / slugs. Best regards
2011-09-28, 16:51:56
tazmandev Wrote:From the SEO point of view, must agree that default language index page should look like www.domain.com not www.domain.com/en/ I'm not sure, if from a SEO point of view this is so, as from my point of view (and for my uses) it is much more important to be user friendly then SEO friendly. But I thought that that's what the canonical meta tag was for, too? tazmandev Wrote:I think that default language index page should be treated exactly like GetSimple does, it is left with no parameter. As mentioned above - it's USER friendly. tazmandev Wrote:I had to hack getFancyLanguageUrl() function to make my ulr look like old urls. (witch I am not happy with) I can include that in a future version. tazmandev Wrote:And Last: That would be another plugin for somebody else to do. (The I18N plugin started as a small simple plugin for a relative who needed 3 languages on her site)
2011-09-30, 04:25:07
Perhaps a not so bad solution would be to change the form of the translated slug to something like
index_en_TRANSLATED-SLUG This way we just expand the current logic to include a translated string in the same variable, then splitting this string on underscore will give us all three needed vars: basic slug, language and translated slug. I am very busy these days with two other projects, but this seems interesting to try to code. As soon as I find some time I will try to implement this then post here for the review and evetual implementation in the official version.
2011-10-06, 03:18:09
Ok, I agree user friendly is important.
Perhaps some little adjustments could be done, without being user unfriendly. What I mean is: Option that when using Fancy URL, and main language set in config, main language to have url unchanged, like dizarter modified the code. This would solve most of seo issues, and let the web designer chose the behavior. Do not get me wrong. I really appreciate the hard work you put into this plugin, witch is an excellent one. I also understand that this is gnu code and modifs are made on "spare" time. Thank you again for this great plugin.
2011-10-06, 03:58:13
I18N version 2.5:
2011-10-06, 20:16:52
How add .current (if it's possible) on my flags links ?
(I use <?php echo htmlspecialchars(return_i18n_lang_url('en')); ?> ) Thanks a lot
2011-10-07, 00:42:28
missfx Wrote:How add .current (if it's possible) on my flags links ? Something like the following (assuming en as default languages, de and es as additional languages): Code: <?php
2011-10-07, 06:36:32
(This post was last modified: 2011-10-07, 06:41:09 by Shop For Tea 7.)
mvlcek: I Bow to you. Thank you very much for the update. You made (at least) my live easier.
The %nondefaultlanguage% is realy so ... briliant and simple solution.
2011-10-13, 01:59:10
Great thanks a lot !!!
mvlcek Wrote:missfx Wrote:How add .current (if it's possible) on my flags links ?
2011-10-16, 17:44:12
Is it possible to show navigational links for certain pages in the footer?
I don't want the privacy page to show in the main navigational menu only in the footer menu.
2011-10-16, 18:31:55
Synergy Wrote:Is it possible to show navigational links for certain pages in the footer? Just switch off "Add to menu" for this page and add a link in the footer with Code: <?php get_i18n_link('privacy'); ?>
2011-10-20, 19:39:08
Hello,
I am using get_i18n_navigation(return_page_slug(), 0,99, I18N_SHOW_PAGES) to generate a site listing. I also have a custom 404 page, with page-slug "404" (necessary to have GS present this page for a 404 error). I want to hide the 404 page in the site listing, but I18N generates each list-item class from the page slug. The 404 page entry starts: <li class="404">, but a class name must begin with a letter. Using a css selector of .404 has no effect. I have forced a substitution of 'four04' for the class in this case, but perhaps the I18N plug-in should consider cases where page slugs may start with a non-letter character. Not a high probability outside the 404 case, I agree, but possible.
--
Nick.
2011-10-26, 19:47:08
mvlcek, why i18n_navigation does'nt have RU translation while i18n_base does?
you can fix it with attachment
2011-10-26, 20:27:50
I18N version 2.5.1:
2011-10-27, 19:00:06
mvlcek, you're VERY fast
2011-10-31, 15:52:05
mvlcek, as for now, if i have the structure something similar
Code: page / subpage / sub-subpage / sub-sub-subpage Code: example.com/sub-subpage/sub-sub-subpage Code: example.com/SUBPAGE/sub-subpage/sub-sub-subpage
2011-10-31, 17:05:42
SlavaP Wrote:mvlcek, as for now, if i have the structure something similar This is a limitation of how GetSimple creates links. The link creating function is used in too many places to be easily extendable by a plugin.
2011-11-01, 20:33:03
Hello,
If I look in the source code of a new generated page, I have the wrong language and charset: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>index</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> It should be de and utf-8.
What is wrong??
2011-11-01, 21:38:43
sax Wrote:Hello, Just change your template for the character set. You can use the following instead of a hardcoded language in your template: Code: <?php global $language; echo @$language ? $language : 'en'; ?>
2011-11-02, 10:01:01
(This post was last modified: 2011-11-02, 10:11:22 by Sekenderalk22.)
Thank you mvlcek.
I didn't find out how your code <?php global $language; echo @$language ? $language : 'en'; ?> works, but I thought that I18N sets the language according to the site name ending (..._en)? I need 'de' language setting for german sites and 'en' for english sites because google robots ignore sites with wrong language settings (I had this problem before....). Is there another theme that can do this? Or do I have to make two versions of the same theme with different language settings? Kind regards Matthias |
« Next Oldest | Next Newest »
|