LanguageApi
extends AbstractApi
in package
Crowdin supports more than 300 world languages and custom languages created in the system.
Use API to get the list of all supported languages and retrieve additional details (e.g. text direction, internal code) on specific language.
Table of Contents
Methods
- create() : Language|null
- Add Custom Language
- delete() : mixed
- Delete Custom Language
- get() : Language|null
- Get Language Info
- list() : ModelCollection
- List Supported Languages
- update() : Language|mixed
- Edit Custom Language
Methods
create()
Add Custom Language
public
create(array<string|int, mixed> $data) : Language|null
Parameters
- $data : array<string|int, mixed>
-
string $data[name] required
string $data[code] required
string $data[localeCode] required
string $data[textDirection] required
string[] $data[pluralCategoryNames] required
string $data[threeLettersCode] required
string $data[twoLettersCode]
string $data[dialectOf]
Tags
Return values
Language|nulldelete()
Delete Custom Language
public
delete(string $languageId) : mixed
Parameters
- $languageId : string
Tags
get()
Get Language Info
public
get(string $languageId) : Language|null
Parameters
- $languageId : string
Tags
Return values
Language|nulllist()
List Supported Languages
public
list([array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $params : array<string|int, mixed> = []
-
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionupdate()
Edit Custom Language
public
update(Language $language) : Language|mixed
Parameters
- $language : Language