projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tabs/menu/roles extensions moved to module hooks file, added (un)install hooks.
[fa-stable.git]
/
includes
/
lang
/
gettext.php
diff --git
a/includes/lang/gettext.php
b/includes/lang/gettext.php
index 3dc2e88df711bbbc0a2870f45dcf2ef9b40aece0..dfa778e32e07cc6ab84bdabb8453ca50c9da07f8 100644
(file)
--- a/
includes/lang/gettext.php
+++ b/
includes/lang/gettext.php
@@
-60,6
+60,7
@@
function is_error($err) {
class gettext_native_support
{
var $_interpolation_vars = array();
class gettext_native_support
{
var $_interpolation_vars = array();
+ var $domain_path;
/**
* Set gettext language code.
/**
* Set gettext language code.
@@
-125,6
+126,8
@@
class gettext_native_support
*/
function add_domain($domain, $path=false, $version='')
{
*/
function add_domain($domain, $path=false, $version='')
{
+ if ($path === false)
+ $path = $this->domain_path;
if ($path === false)
$path = "./locale";
if ($domain == "")
if ($path === false)
$path = "./locale";
if ($domain == "")
@@
-293,8
+296,13
@@
class gettext_php_support extends gettext_native_support
* @param string $path optional -- Repository path
* @throws GetText_Error
*/
* @param string $path optional -- Repository path
* @throws GetText_Error
*/
- function add_domain($domain, $path =
"./locale/"
, $version ='')
+ function add_domain($domain, $path =
false
, $version ='')
{
{
+ if ($path === false)
+ $path = $this->domain_path;
+ if ($path === false)
+ $path = "./locale";
+
if ($version) {
$domain .= '-'.$version;
}
if ($version) {
$domain .= '-'.$version;
}