Re: suggested tools for simple i18n

From: Date: Sun, 29 Jan 2006 13:11:46 +0000
Subject: Re: suggested tools for simple i18n
References: 1 2 3  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-902@lists.php.net to get a copy of this message
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

« previous php.i18n (#902) next »