Go Back   Webmaster Desk Forum | Voice of webmasters > Development Desk > Programming > PHP

Reply

 

LinkBack Thread Tools Display Modes

multilingual website
  #1  
Old 17-04-2008, 12:27 PM
thosecars82 thosecars82 is offline
Junior Member
 
Join Date: Apr 2008
Posts: 9
thosecars82 is on a distinguished road
Default multilingual website

hello guys

I want to develop a multilingual website with php. I do not have many ideas about how to do a site multilingual. I have been looking for some information but what I have got until now seems a bit confusing to me.

The most obvious solution is having one static page for each language. Besides I have seen something about using a table in the database to extract the translations to the corresponding language. However, I have seen that it might take too long for people to see a page because the query might delay the process.


I do not know if this option is the best. Could you please provide me with some good and brilliant approach to solve this issue in any website of any size and with any number of different languages?


Thanks in advance
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

poedit translation
  #2  
Old 18-04-2008, 01:02 PM
thosecars82 thosecars82 is offline
Junior Member
 
Join Date: Apr 2008
Posts: 9
thosecars82 is on a distinguished road
Default poedit translation

Hello folks
This thing is driving me crazy!
I am trying to use the poedit to translate a php hello world website. Although it seems to me that I am doing everything alright, I still don't see the translation in my browser when I browse
http://localhost/pruebalocal1/caca/test.php

The only thing I see is the original message, that is to say, "Hello World". I have done the translation with poedit though. Moreover, I saved it in two files called messages.po and messages.mo

This is my test.php code:

<?php
$locale = "de_DE";
putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "./locale");
textdomain("messages");
print "<p>".gettext("Hello World")."</p>\n";
?>


My poedit screen looks like the screenshoot attached.

My directories are like this:

C:\xampp\htdocs\pruebalocal1\caca
C:\xampp\htdocs\pruebalocal1\caca\test.php
C:\xampp\htdocs\pruebalocal1\caca\locale
C:\xampp\htdocs\pruebalocal1\caca\locale\de_DE
C:\xampp\htdocs\pruebalocal1\caca\locale\de_DE\LC_ MESSAGES C:\xampp\htdocs\pruebalocal1\caca\locale\de_DE\LC_ MESSAGES\messages.po
C:\xampp\htdocs\pruebalocal1\caca\locale\de_DE\LC_ MESSAGES\messages.mo

I hope I have explained myself clearly enough.
Please, I would appreciate any help about this issue.
Thanks in advance
Attached Images
File Type: jpg screenshot.jpg (28.7 KB, 0 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3  
Old 18-04-2008, 05:54 PM
Rezwan Rezwan is offline
Administrator
 
Join Date: Jul 2007
Posts: 41
Rezwan will become famous soon enoughRezwan will become famous soon enough
Send a message via MSN to Rezwan Send a message via Yahoo to Rezwan Send a message via Skype™ to Rezwan
Default

you may get some idea from here: http://www.phpsimplicity.com/tips.php?id=15
__________________
Visit Web Directory and Blog Network
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:20 AM.




Webmaster Desk forum is a concern of Graffias Web service network

Skin by: eXtremepixels Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.