Re: [PHP-I18N] suggested tools for simple i18n

[email protected] (Florian Breit)
Newsgroups php.i18n
Message-ID <[email protected]>
Hello Thorsten,

 > Any reason you did not reply to the list?

This is just because the ezmlm at lists.php.net does not include a 
Return-To path and if I'm going to hit the reply button then it will 
just send the reply to the original author, not to the list. I often 
forget to send a copy to the list because for most others there is a 
Reply-To included.

 >> Another nice solution is to include a file with an array of language
 >> specific strings, as the people form phpBB did.
 >> For example:
 >
 >
 > right, but that won't work for japanese.

For me this will work with japanese also.
I just did a test as you can see at http://s01.w4h.biz/japanese-test.php

Here is my jp-jp.php:
<?php
$lang = array('lone wolf and cube' => '子連れ狼',
               'daigoro'  => '大五郎',
               'ogami itto' => '拝 一刀',
);
?>

And here is my japanese-test.php:
<?='<?xml version="1.0" encoding="UTF-8"?>'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
   <head>
     <title>New Document</title>
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
   </head>
   <body>
     <pre>
       <?php
       include_once('jp-jp.php');
       var_dump($lang);
       ?>
     </pre>
   </body>
</html>

Output is:
array(3) {
   ["lone wolf and cube"]=>
   string(12) "子連れ狼"
   ["daigoro"]=>
   string(9) "大五郎"
   ["ogami itto"]=>
   string(10) "拝 一刀"
}

So, everything works correctly.
Maybe do you have had the wrong charset for the ouput or your editor 
doesn't support japanese?

Regards,
Florian Breit
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.