Mise à jour des localisations

-spanish, german, french
This commit is contained in:
2024-12-13 06:42:00 +01:00
parent f056c8a9a0
commit 3ee1a9eaf6
9 changed files with 2660 additions and 1063 deletions

View File

@@ -220,7 +220,7 @@ function localize($domain) {
echo "langue: " . $langue . "<br>";
*/
putenv('LC_ALL=' . $langue);
putenv('LC_ALL=' . $langue); // $langue = fr_FR.utf8
$loc = setlocale(LC_ALL, $langue);
bindtextdomain($domain, $root . '/Locale/nocache'); // by-pass gettext() cache. Now the cache is forced to flush every time.
@@ -230,4 +230,24 @@ function localize($domain) {
$nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
}
function motranslator($domain) {
require('vendor/autoload.php');
// Create loader object
$loader = new PhpMyAdmin\MoTranslator\Loader();
// Set locale
//$loader->setlocale('fr');
$loader->setlocale('fr_FR.utf8');
// Set default text domain
$loader->textdomain('sentier');
// Set path where to look for a domain
//$loader->bindtextdomain('sentier', __DIR__ . '/data/locale/');
$loader->bindtextdomain('sentier', __DIR__ . '/Locale/');
}
?>