FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-25-2002, 10:52 AM   Postid: 62565
jeep
Site Owner
 
jeep's Avatar

Forum Notability:
34 pts: User-friendly
[Post Feedback]
 
Join Date: Dec 2001
Location: Brighton, United Kingdom
Posts: 229
I can see some of the benefits from automated tools like gettext, but still it seems awfully complicated. All these files and command-line tools.

They way I do it was inspired by the system in Java. Basically I have a file with variables like
PHP Code:
$text_profile_welcome "welcome to your profile" 
where the middle portion of the variable is the file name and the final part is a descriptor.

These are kept in a file called language_en.php or language_fr.php etc etc. Then I do an include at the top of each page
PHP Code:
if (!$language) {
   include(
$abs_path."/language_en.php");
} else {
   include(
$abs_path."/language_".strtolower($language).".php");

In my mind not only is that easier but it's going to be faster than reading text files etc etc

Jason
__________________
Swing Digital - online community consultancy
jeep is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
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
Forum Jump


All times are GMT -4. The time now is 08:17 PM.


Running on vBulletin®
Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2010 FutureQuest, Inc.
FutureQuest, Inc.