General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 23rd, 2004, 02:06 AM
sk89q sk89q is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 sk89q User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Localisation Issues

I have questions regarding localisation for a website running on PHP.

1. Should I use Unicode, or a different charset fitted for the language?
2. Doesn't font (i.e. Verdana, Arial, etc.) matter? Will it break anything if I try to use a font that does not support the characters needed?
3. PHP Question: When I try to do preg_replace on a page with some Chinese characters in UTF-8, the returned text becomes these nice hollow boxes. Any idea why?

Thanks. Your help is greatly appreciated!

Reply With Quote
  #2  
Old January 23rd, 2004, 08:55 PM
aboyousif aboyousif is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Tanta, Egypt
Posts: 21 aboyousif User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 23 sec
Reputation Power: 0
Send a message via AIM to aboyousif Send a message via MSN to aboyousif Send a message via Yahoo to aboyousif
you should first make a tree of languages folder like the follow ..

Languages --
|
|---- Arabic
|
|----Chinese
|
|----English
|
|----...... etc

Then you have in config file add these lines

PHP Code:
<?
$sellang
="Arabic";
?>


and in the file you want to translate do the next

PHP Code:
<?
include ("config.php");
include (
"language\\$sellang\main.php");
?>

this will make you choose the file for each translated language also you could use css file for the fonts and do the charsets as strings in each files ...etc ..
for the best translate language use
PHP Code:
<?
define
("the_word_in_english","the_word_in_your_lang");
?>

i hope it solve the proplem ..

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Localisation Issues


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT