Mailinglisten-Archive |
* Stefan Brueckmann wrote:
> Was haltet ihr von der Idee alle Text-Meldungen die ich ausgebe aus
> einer Db zu holen.
Das Topic hatten wir vor kurzem schon. Mach es ähnlich wie gettext:
printf("<td>%s</td>",__('You don\'t have the specific rights'));
function __($str) {
global $lang;
if (isset($lang[$str])) {
return $lang[$str];
} else {
return $str;
}
}
und irgendwo, file lang_de.php:
$lang = array(
'You don\'t have the specific rights' => 'Sie haben nicht genügend Rechte'
...
);
und in lang_fr.php:
$lang = array(
'You don\'t have the specific rights' => 'Ne pas blafasel'
....
);
je nach eingesteller Sprache wird dann lang_X.php zur Laufzeit includiert.
You get the point?
--
Schnellanbindung an 350 Standorte?! CaseStudy anfordern unter:
transaktionsserver at emailseminar.de
ThinkPHP / rent-a-phpwizard bjoern at thinkphp.de
Sedanstraße 27 Tel: 0931 / 78 43 804
97082 Würzburg Fax: 0931 / 78 43 795
http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/
php::bar PHP Wiki - Listenarchive