Merge branch 'devel/chris'
This commit is contained in:
commit
7dd8bdff77
@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace App\Utility;
|
|
||||||
|
|
||||||
function gettext_init(string $package,string $localedir,?string $lang=null)
|
|
||||||
{
|
|
||||||
if (function_exists("gettext"))
|
|
||||||
{
|
|
||||||
if (!lang) {
|
|
||||||
$lang=getenv("LANG");
|
|
||||||
if (!$lang) {
|
|
||||||
$lang="";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setlocale(LC_ALL,$lang);
|
|
||||||
bindtextdomain($package,$localedir);
|
|
||||||
textdomain($package);
|
|
||||||
if (function_exists("bind_textdomain_codeset")) {
|
|
||||||
bind_textdomain_codeset($package, "UTF-8");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function gettext_lib_init(string $package,string$localedir,?string $lang=null)
|
|
||||||
{
|
|
||||||
if (function_exists("gettext")) {
|
|
||||||
if (!$lang) {
|
|
||||||
$lang=getenv("LANG");
|
|
||||||
if (!$lang) {
|
|
||||||
$lang="";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setlocale(LC_ALL,$lang);
|
|
||||||
bindtextdomain($package,$localedir);
|
|
||||||
if (function_exists("bind_textdomain_codeset")) {
|
|
||||||
bind_textdomain_codeset($package, "UTF-8");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user