Jump to content

Url Linking in Multi-language PHP site


whitedragon

Recommended Posts

Hi,

 

I'm a newbie with php.  I know it is possible to set multi-languages for a php site, but is linking to a specific page with a specific set language within a website possible?  The homepage has a set default language and the other languages are set by users clicking on the language after the homepage with the default language is accessed.

 

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/200610-url-linking-in-multi-language-php-site/
Share on other sites

Yes, this is perfectly possible.

 

By default your URL will look like (and all translations will translate to this one):

 

http://www.domain.top/my/page

 

Your database provides translations for my & page for other languages, so in Dutch I would be able to access your page like:

 

http://www.domain.top/mijn/pagina

 

Or in French:

 

http://www.domain.top/mon/page

 

Based on the locale (fr_FR, nl_BE) you would translate everything after domain.top to your default language (hence the word translation).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.