diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-15 11:09:37 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-01-26 14:02:31 +0100 |
commit | 043625ee522357e25bb786c4b439c90ab21bbfd1 (patch) | |
tree | 633c64268cb5a302436ba61d20eeb7eaf7a5e516 /lib/public/l10n | |
parent | 29a93064299f57584c6aadc8a6c56b51715d7269 (diff) | |
download | nextcloud-server-043625ee522357e25bb786c4b439c90ab21bbfd1.tar.gz nextcloud-server-043625ee522357e25bb786c4b439c90ab21bbfd1.zip |
Move findLanguage() and setLanguageFromRequest() to factory
Diffstat (limited to 'lib/public/l10n')
-rw-r--r-- | lib/public/l10n/ifactory.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/public/l10n/ifactory.php b/lib/public/l10n/ifactory.php index 09c75e9af7d..2d6f8e873cc 100644 --- a/lib/public/l10n/ifactory.php +++ b/lib/public/l10n/ifactory.php @@ -35,6 +35,15 @@ interface IFactory { public function get($app, $lang = null); /** + * Find the best language + * + * @param string|null $app App id or null for core + * @return string language If nothing works it returns 'en' + * @since 9.0.0 + */ + public function findLanguage($app = null); + + /** * Find all available languages for an app * * @param string|null $app App id or null for core @@ -50,4 +59,11 @@ interface IFactory { * @since 9.0.0 */ public function languageExists($app, $lang); + + /** + * @param string|null $app App id or null for core + * @return string + * @since 9.0.0 + */ + public function setLanguageFromRequest($app = null); } |