.htaccess - Multi language basic php website without subdomain or sub-folders -
right have website uses 2 languages english , german. there no sub folders or sub-domains used. correct language shown using $_session[lang]
, , gettext function.
example.com/about-us.php
if '$_session[lang]' = en
page shown in english , if '$_session[lang]' = de
page shown in dutch
but not seo freindly. want keep structure of folders same , want add paramenter in url specify language.
example.com/en/about-us.php
for english ,
example.com/de/about-us.php
for german.
"both pages example.com/en/about-us.php , example.com/de/about-us.php should point file root/webspace/about-us.php, is, folders /en , /de virtual (should not exist in reality avoid code redundance). inside file about-us.php should able know virtual folder called (/en or /de) able define session variable define gettext's language.
how can accomplish this? reply
Comments
Post a Comment