\OCP\L10NIFactory

Summary

Methods
Constants
get()
findLanguage()
findAvailableLanguages()
languageExists()
setLanguageFromRequest()
createPluralFunction()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

get()

get(string  $app, string|null  $lang = null) : \OCP\IL10N

Get a language instance

Parameters

string $app
string|null $lang

Returns

\OCP\IL10N

findLanguage()

findLanguage(string|null  $app = null) : string

Find the best language

Parameters

string|null $app

App id or null for core

Returns

string —

language If nothing works it returns 'en'

findAvailableLanguages()

findAvailableLanguages(string|null  $app = null) : array<mixed,string>

Find all available languages for an app

Parameters

string|null $app

App id or null for core

Returns

array<mixed,string> —

an array of available languages

languageExists()

languageExists(string|null  $app, string  $lang) : boolean

Parameters

string|null $app

App id or null for core

string $lang

Returns

boolean

setLanguageFromRequest()

setLanguageFromRequest(string|null  $app = null) : string

Parameters

string|null $app

App id or null for core

Returns

string

createPluralFunction()

createPluralFunction(string  $string) : string

Creates a function from the plural string

Parameters

string $string

Returns

string —

Unique function name