mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-01-23 02:35:23 +00:00
remove unnecessary variable
This commit is contained in:
parent
3caf3214f1
commit
0e2055d54a
1 changed files with 4 additions and 5 deletions
|
|
@ -173,21 +173,20 @@ class I18n
|
|||
array_key_exists('lang', $_COOKIE) &&
|
||||
($key = array_search($_COOKIE['lang'], $availableLanguages)) !== false
|
||||
) {
|
||||
$match = $availableLanguages[$key];
|
||||
self::$_language = $availableLanguages[$key];
|
||||
}
|
||||
// find a translation file matching the browsers language preferences
|
||||
else {
|
||||
$match = self::_getMatchingLanguage(
|
||||
self::$_language = self::_getMatchingLanguage(
|
||||
self::getBrowserLanguages(), $availableLanguages
|
||||
);
|
||||
}
|
||||
|
||||
// load translations
|
||||
self::$_language = $match;
|
||||
if ($match == 'en') {
|
||||
if (self::$_language == 'en') {
|
||||
self::$_translations = array();
|
||||
} else {
|
||||
$data = file_get_contents(self::_getPath($match . '.json'));
|
||||
$data = file_get_contents(self::_getPath(self::$_language . '.json'));
|
||||
self::$_translations = Json::decode($data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue