Hi team, i have a site in english and i want to translate it into italian. Any one with any code snippet or technique to do this? i want the user to be able to choose preffered language to browse the site.. thx,
I will upload the current site if necessary
multilingual php site
Moderator: General Moderators
Re: multilingual php site
here is the site.. some codes need to be fixed too.. i will appreciate anyone willing to assist me.. thx
- Attachments
-
- New WinRAR ZIP archive.zip
- (1.54 MiB) Downloaded 113 times
Re: multilingual php site
Depends on the site setup. For CMS-driven content, I'll typically use separate fields for each language, say title_en and title_fr, content_en and content_fr, etc. and choose which to display based on the language chosen by the user. For more static strings, you can use locale files (ie. .po) or even hashes.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: multilingual php site
There are a number ways to do this. The simplest is multiple templates in sub-directories -- one directory for each language code. You can also use CSV files or even databases. And there is PHP's gettext() support.
(#10850)
Re: multilingual php site
OK team. can anyone put a litle tutorial together for me on how to do this? i will also be happy if you can download the attachment and go tru it for constructive criticism.. thx
Re: multilingual php site
Nobody's going to download some random zip. Why not put your code somewhere we can see it (Pastebin, Bit Bucket, GitHub, etc)?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: multilingual php site
Your first decision is whether you want to have separate files for each page for each language, or do have multi-lanugage code in the page?
(#10850)