[imp] gettext problems (still)
Frederic Trudeau
ftrudeau@cam.org
Thu, 9 May 2002 14:18:46 -0700
This is a multi-part message in MIME format.
---------------------- multipart/alternative attachment
Hello all.
Im currently building an application that uses gettext, much like Horde =
applications does, and I have a small problem, that im sure you guys =
will figure out instantly.
Consider this array ;
$Services['SHELL_ACCT'] =3D array (
'translation' =3D> _("Shell acount"),
'time_usage' =3D> '0',
'disk_usage' =3D> '1',
'pass_change' =3D> '1'
);
This array is part of a file called 'services.inc.php', that is included =
on each pages of the application.
This gets translated fine ;
<?=3D_("Shell acount");?>
... but if I call up the string to be translated by its value in the =
array, it does NOT get translated ;
<?=3D$Services['SHELL_ACCT']['translation'];?>
or
<? echo $Services['SHELL_ACCT']['translation']; ?>
Anyone knows why ? Any help would be very appreciated !!
Thanks =3D)
---------------------- multipart/alternative attachment
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4915.500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello all.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Im currently building an application =
that uses=20
gettext, much like Horde applications does, and I have a small problem, =
that im=20
sure you guys will figure out instantly.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Consider this array ;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>$Services['SHELL_ACCT'] =3D array=20
(<BR> 'translation' =3D> =
_("Shell=20
acount"),<BR> 'time_usage' =
=3D>=20
'0',<BR> 'disk_usage' =3D>=20
'1',<BR> 'pass_change' =3D> =
'1'<BR>);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This array is part of a file called=20
'services.inc.php', that is included on each pages of the=20
application.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This gets translated fine =
;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><?=3D_("Shell =
acount");?></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>... but if I call up the string to be =
translated by=20
its value in the array, it does NOT get translated ;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2><?=3D$Services['SHELL_ACCT']['translation'];?></FONT></DIV=
>
<DIV><FONT face=3DArial size=3D2>or</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><? </FONT><FONT face=3DArial =
size=3D2>echo=20
$Services['SHELL_ACCT']['translation']; </FONT><FONT face=3DArial=20
size=3D2>?></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Anyone knows why ? Any help would be =
very=20
appreciated !!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks =3D)</FONT></DIV></BODY></HTML>
---------------------- multipart/alternative attachment--