Closed Thread Icon

Topic awaiting preservation: professional language management Pages that link to <a href="https://ozoneasylum.com/backlink?for=12459" title="Pages that link to Topic awaiting preservation: professional language management" rel="nofollow" >Topic awaiting preservation: professional language management\

 
Author Thread
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-04-2002 00:43

ok, im having that site:
about 30 pages in a 2-layer menu-hierarchie. always the same template and im including the necessary content with
include ($content.".html");

works very well so far.
but now the client wants to have the very same site in another language too. so what would be the best way to accomplish that?

i thought of something like this:
im putting up the 2 contents in 2 dirs:
/en/
/de/
then, im using a variable $lang in the url which determines the actual language and depending on that im including
include ($lang."/".$content.".html");

this may actually work, but i havent implemented it yet, cause there is one thing that bothers me:
how do i transport the $lang variable to the next page without manually adding it to all the links?

though if you have any other suggestions for language management, id like to hear them!
thanks

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-04-2002 01:11

tis called a cookie, once someone picks a language set a cookie to tell you where to go.


Or with directories using something like this

/httpdocs/ in here you have all your english include docs and an index.php file
/httpdocs/de/ you have all your dutch(?) includes and a second identical index.php file
/httpdocs/templates Where you have your templates

Now use an absolute path to the template pages something like (/usr/var/www/templages/header.php) type path to include templates and just a relative include("content.php") This works fine for as long as they are in the english directory. Then when decide to go to the dutch, you send them to that directory where they will get all the includes from there. You could use an "en/" directory but since you kinda need a default anyway it may as well be English

Does this make sense?



.:[ Never resist a perfect moment ]:.

[This message has been edited by bitdamaged (edited 10-04-2002).]

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 10-04-2002 02:27

cookies! oh yeah! how could i forget about them!


quote: Does this make sense?

well, im thinkin about it..., yes it does! nice trick with the absolute url. great, now i cant decide between cookie and absolute url.

(and de is german )

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 10-04-2002 05:36

If you haven't released the site yet, I'd say use the $lang like you mentioned, and write the default language to a cookie, as bitdamaged mentioned.

« BackwardsOnwards »

Show Forum Drop Down Menu