diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-06-19 23:33:34 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-06-19 23:33:34 +0200 |
commit | b31a8ac985c829fde5e7baa90efd21eeb27fb08c (patch) | |
tree | 71612ecbd85022e39fcdbb27c69e10f06111d4ad /lib | |
parent | 51c0a8e3ced84eeb4465d5f81571b448f231a4a5 (diff) | |
download | nextcloud-server-b31a8ac985c829fde5e7baa90efd21eeb27fb08c.tar.gz nextcloud-server-b31a8ac985c829fde5e7baa90efd21eeb27fb08c.zip |
More l10n-stuff
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/l10n.php b/lib/l10n.php index 2f72b971173..8a7ff9d8535 100644 --- a/lib/l10n.php +++ b/lib/l10n.php @@ -110,6 +110,16 @@ class OC_L10N{ } /** + * @brief getTranslations + * @returns Fetch all translations + * + * Returns an associative array with all translations + */ + public function getTranslations(){ + return $this->translations; + } + + /** * @brief Localization * @param $type Type of localization * @param $params parameters for this localization @@ -202,11 +212,10 @@ class OC_L10N{ closedir($dh); } } - if( isset($_SESSION['user_id']) && $_SESSION['user_id'] && OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' )){ $lang = OC_PREFERENCES::getValue( $_SESSION['user_id'], 'core', 'lang' ); self::$language = $lang; - if( array_search( $lang, $available )){ + if( array_search( $lang, $available ) !== false ){ return $lang; } } @@ -226,12 +235,9 @@ class OC_L10N{ } /** - * @brief find the best language + * @brief find the l10n directory * @param $app App that needs to be translated - * @returns language - * - * Finds the best language. Depends on user settings and browser - * information + * @returns directory */ protected static function findI18nDir( $app ){ global $SERVERROOT; |