summaryrefslogtreecommitdiffstats
path: root/lib/private/l10n/factory.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-08-31 10:05:59 +0200
committerRobin Appelman <icewind@owncloud.com>2014-08-31 10:08:22 +0200
commitd0266c0bf85e431a3b1b39cbfaced4e8df52a264 (patch)
treedfea49fa907a3b7543f8849077d75cfc29a54279 /lib/private/l10n/factory.php
parent23137f4798cb89b188329050a85f2f3a706947c5 (diff)
downloadnextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.tar.gz
nextcloud-server-d0266c0bf85e431a3b1b39cbfaced4e8df52a264.zip
Use public api for getting l10n
Diffstat (limited to 'lib/private/l10n/factory.php')
-rw-r--r--lib/private/l10n/factory.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/l10n/factory.php b/lib/private/l10n/factory.php
index d0c3799b9c2..fcc3f3e3394 100644
--- a/lib/private/l10n/factory.php
+++ b/lib/private/l10n/factory.php
@@ -20,12 +20,15 @@ class Factory {
/**
* get an L10N instance
+ *
* @param string $app
* @param string|null $lang
* @return \OC_L10N
*/
- public function get($app) {
- if (!isset($this->instances[$app])) {
+ public function get($app, $lang = null) {
+ if (!is_null($lang)) {
+ return new \OC_L10N($app, $lang);
+ } else if (!isset($this->instances[$app])) {
$this->instances[$app] = new \OC_L10N($app);
}
return $this->instances[$app];