diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-29 16:44:08 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-29 16:44:08 +0200 |
commit | 723f8c8f1ba8c9859ec2d46515dc06e7236f89c0 (patch) | |
tree | 5cff022dc72e1a8511545888e489efef6dd21344 /lib/public | |
parent | faa62d17993b9467f0041cbca2cafccdcb243385 (diff) | |
parent | 37b00b7443bec09aac84b359a1c2f77caf143b30 (diff) | |
download | nextcloud-server-723f8c8f1ba8c9859ec2d46515dc06e7236f89c0.tar.gz nextcloud-server-723f8c8f1ba8c9859ec2d46515dc06e7236f89c0.zip |
Merge pull request #18620 from owncloud/add-public-interface-for-factory
Add a public interface for the language factory so apps can use it
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/il10n.php | 2 | ||||
-rw-r--r-- | lib/public/l10n/ifactory.php | 36 |
2 files changed, 37 insertions, 1 deletions
diff --git a/lib/public/il10n.php b/lib/public/il10n.php index e1d0102105b..c6e076a21f8 100644 --- a/lib/public/il10n.php +++ b/lib/public/il10n.php @@ -100,7 +100,7 @@ interface IL10N { /** - * The code (en, de, ...) of the language that is used for this OC_L10N object + * The code (en, de, ...) of the language that is used for this IL10N object * * @return string language * @since 7.0.0 diff --git a/lib/public/l10n/ifactory.php b/lib/public/l10n/ifactory.php new file mode 100644 index 00000000000..b784505a68b --- /dev/null +++ b/lib/public/l10n/ifactory.php @@ -0,0 +1,36 @@ +<?php +/** + * @author Joas Schilling <nickvergessen@owncloud.com> + * + * @copyright Copyright (c) 2015, ownCloud, Inc. + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCP\L10N; + +/** + * @since 8.2.0 + */ +interface IFactory { + /** + * Get a language instance + * + * @param string $app + * @param string|null $lang + * @return \OCP\IL10N + * @since 8.2.0 + */ + public function get($app, $lang = null); +} |