summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-27 09:37:00 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-27 09:37:00 +0100
commit1594371c8c0124af2469bd70b9b917bfd845ae19 (patch)
treea7fb0546707e05984fa78f45a53563514b9c9d4d /lib/public
parent5b7a1b13f3514f60650e1da41d8dc046ee0252c5 (diff)
parent3a6390031cb7e6575edd8d4a5271614eb8ba9470 (diff)
downloadnextcloud-server-1594371c8c0124af2469bd70b9b917bfd845ae19.tar.gz
nextcloud-server-1594371c8c0124af2469bd70b9b917bfd845ae19.zip
Merge pull request #21741 from owncloud/l10n-improvements
Move methods to the factory that are not related to translating, but to guessing/finding the language
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/l10n/ifactory.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/public/l10n/ifactory.php b/lib/public/l10n/ifactory.php
index fa3f84fa2fd..264c9719639 100644
--- a/lib/public/l10n/ifactory.php
+++ b/lib/public/l10n/ifactory.php
@@ -33,4 +33,47 @@ interface IFactory {
* @since 8.2.0
*/
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
+ * @return string[] an array of available languages
+ * @since 9.0.0
+ */
+ public function findAvailableLanguages($app = null);
+
+ /**
+ * @param string|null $app App id or null for core
+ * @param string $lang
+ * @return bool
+ * @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);
+
+
+ /**
+ * Creates a function from the plural string
+ *
+ * @param string $string
+ * @return string Unique function name
+ * @since 9.0.0
+ */
+ public function createPluralFunction($string);
}