Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-06-20 01:33:34 +0400
committerJakob Sack <kde@jakobsack.de>2011-06-20 01:33:34 +0400
commitb31a8ac985c829fde5e7baa90efd21eeb27fb08c (patch)
tree71612ecbd85022e39fcdbb27c69e10f06111d4ad /lib/l10n.php
parent51c0a8e3ced84eeb4465d5f81571b448f231a4a5 (diff)
More l10n-stuff
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php20
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;