Internationalisation (i18n)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
breitsch
Posts: 473
Joined: Sun 6. Mar 2005, 23:12
Location: bern switzerland

Internationalisation (i18n)

Post by breitsch »

is there any chance to:

- include the translations (4 Languages) into the search engine?
- have a language-switch on the site nevertheless the scripts uses the browser language, so I can still choose the language on the site?
http://www.youtube.com/watch?v=jqxENMKaeCU
because it's important!
breitsch
breitsch
Posts: 473
Joined: Sun 6. Mar 2005, 23:12
Location: bern switzerland

Re: Internationalisation (i18n)

Post by breitsch »

...
and what happens with Google Search?
http://www.youtube.com/watch?v=jqxENMKaeCU
because it's important!
breitsch
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Internationalisation (i18n)

Post by update »

I think that probably almost no one got the meaning of your question. Is possible at least...
The second part of your question couls be answered with yes (in case I got it right), because the browser language could be injected in any case and is therefore quite independent.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
breitsch
Posts: 473
Joined: Sun 6. Mar 2005, 23:12
Location: bern switzerland

Re: Internationalisation (i18n)

Post by breitsch »

OK another try:

I have a website, default language is german (the content in the DB is in german).
Now I activate the i18n feature and translate the content in the files (folder: template_lang) for english, french, italian.
Everything works fine in my browser.

Now my questions:
1. When I enter an english expression (that exists in my website) into the search field in my website, the phpwcms-search-engine won't find anything (because the expression is not in the database, just in the internationalisation files), is there a workaround for this issue?

2. although my browser language shows me the correct language I would like to have a language-switch on the website, so I can still switch to another language than my browser-language.

3. Does Google find my english, french, italian content? The DB contains only german content, default language is german. Does Google crawl my site with different language HTTP_ACCEPT_LANGUAGE settings? I guess not. And even if; when i click a link to my site in Google Search Listings which refers to english content on my site I may end up in the italian translation for that site when my browser language is italian.

Point 3 actually is crucial for the whole concept.
http://www.youtube.com/watch?v=jqxENMKaeCU
because it's important!
breitsch
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Internationalisation (i18n)

Post by update »

ad 1: This I don't know, never thought about it.
ad 2: a language switch based upon levels? This would always work together with browser / doctype lang: Force it like so (example):

Code: Select all

<?php
//$phpwcms['DOCTYPE_LANG'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$level_id = isset($GLOBALS['LEVEL_ID'][1]) ?  $GLOBALS['LEVEL_ID'][1] : 0;
$id = 0;
if ($level_id == 8 ) {// === [SHOP] Seiten
$phpwcms['DOCTYPE_LANG'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
}
if ($level_id == 123 ) {// === [FORUM] Seiten
$phpwcms['DOCTYPE_LANG'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
}
if ($level_id == 11 ) {// === [DE] Beispiel-Seiten
$phpwcms['DOCTYPE_LANG'] = 'de-de';
$phpwcms['i18_lang'] = 'de';
}
//...and so on
?>
ad 3: If the different languages are only provided by i18n files I doubt if google can find the content. But for what are the HTTP_ACCEPT_LANGUAGE settings if not for telling a browser/search engine what to accept?
So my conclusion: Arrange the different langs in different levels even if with i18n files only, tell the document which lang to serve and the browser what to accept.

But this sounds very complicated...
Tell me if I'm totally wrong or getting you wrong still.... ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Internationalisation (i18n)

Post by Oliver Georgi »

The search is for content while the i18n thing is for templating — nothing else! Do not mix that although it is possible.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: Internationalisation (i18n)

Post by update »

Oliver Georgi wrote:the i18n thing is for templating
Ah, yes, I use it for this purpose, but breitsch's question has been so challenging ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply