summaryrefslogtreecommitdiffstats
path: root/lib/private/l10n.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-09-25 18:34:01 +0200
committerBart Visscher <bartv@thisnet.nl>2013-10-04 18:11:02 +0200
commit9f777fba988422366732a3f128e2fb73ffddfbb4 (patch)
tree69b43762523448f3b59ccf27667b296fb99500e3 /lib/private/l10n.php
parentbae121b16dbabed3ec307ea58e3b8a73ab27161c (diff)
downloadnextcloud-server-9f777fba988422366732a3f128e2fb73ffddfbb4.tar.gz
nextcloud-server-9f777fba988422366732a3f128e2fb73ffddfbb4.zip
Add L10N interface to server container
Diffstat (limited to 'lib/private/l10n.php')
-rw-r--r--lib/private/l10n.php18
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index f93443b886a..3e84c306dc2 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -25,12 +25,7 @@
/**
* This class is for i18n and l10n
*/
-class OC_L10N {
- /**
- * cached instances
- */
- protected static $instances=array();
-
+class OC_L10N implements \OCP\IL10N {
/**
* cache
*/
@@ -83,13 +78,10 @@ class OC_L10N {
* @return OC_L10N
*/
public static function get($app, $lang=null) {
- if(is_null($lang)) {
- if(!isset(self::$instances[$app])) {
- self::$instances[$app]=new OC_L10N($app);
- }
- return self::$instances[$app];
- }else{
- return new OC_L10N($app, $lang);
+ if (is_null($lang)) {
+ return OC::$server->getL10N($app);
+ } else {
+ return new \OC_L10N($app, $lang);
}
}