Source for file I18N_Message.php
Documentation is available at I18N_Message.php
please get the sql-file from
<a href="http://wolfram.kriesing.de/libs/php/SimpleTemplate/examples/translate.sql">here</a>
to make the translate-method work properly<br>
this example requires >=PHP 4.1
* test of I18N_Message_Common
print '<h1>TEST I18N_Messages_Common</h1>';
require_once( 'I18N/Messages/Common.php' );
$strings[] = 'This is a test for all of you out there!';
$strings[] = 'Esto es una prueba para todos vosotros ahi!';
$strings[] = 'je tu il elle nous vous - need french input here :-)';
foreach( $strings as $aString )
echo '<form action="'. $_SERVER['PHP_SELF']. '" method="post">';
echo 'determine language of:<input name="langString" size="50" ';
echo 'value="'. (isset ($_REQUEST['langString'])? $_REQUEST['langString']: 'What language is this?'). '">';
echo '<input type="submit"><br>';
if( $_REQUEST['langString'] )
echo 'I18N_Messages_Common::determineLanguage says it is: <b>';
* test of Message_Translate
* DB file: http://wolfram.kriesing.de/libs/php/examples/SimpleTemplate/translate.sql
print '<h1>TEST I18N_Messages_Translate</h1>';
require_once( 'I18N/Messages/Translate.php' );
$translated[] = $translate->simpleTranslate ( 'source code' , 'de' );
$translated[] = $translate->translate ( 'translate (i.e. into ($someVar-or any other string))' , 'de' );
$translated[] = $translate->translateMarkUpString ( $input , 'de' );
foreach( $translated as $aTrans )
print_r( $translate->getAll ( 'de' ) );
Documentation generated on Mon, 11 Mar 2019 15:36:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|