StringTranslationApi
extends AbstractApi
in package
Use API to add or remove strings translations, approvals, and votes.
Table of Contents
Methods
- create() : StringTranslation|null
- Add Translation
- createApproval() : StringTranslationApproval|null
- Add Approval
- createVote() : Vote|null
- Add Vote
- delete() : mixed
- Delete Translation
- deleteApproval() : mixed
- Remove Approval
- deleteStringTranslations() : mixed
- Delete String Translations
- deleteVote() : mixed
- Cancel Vote
- get() : StringTranslation|null
- Get Translation
- getApproval() : StringTranslationApproval|null
- Approval Info
- getVote() : Vote|null
- Get Vote
- list() : ModelCollection
- List String Translations
- listApprovals() : ModelCollection
- List Translation Approvals
- listLanguageTranslations() : ModelCollection
- List Language Translations
- listVotes() : ModelCollection
- List Translation Votes
- restore() : StringTranslation|null
- Restore Translation
Methods
create()
Add Translation
public
create(int $projectId, array<string|int, mixed> $data) : StringTranslation|null
Parameters
- $projectId : int
- $data : array<string|int, mixed>
-
integer $data[stringId] required
integer $data[languageId] required
string $data[text] required
string $data[pluralCategoryName]
Tags
Return values
StringTranslation|nullcreateApproval()
Add Approval
public
createApproval(int $projectId, array<string|int, mixed> $data) : StringTranslationApproval|null
Parameters
- $projectId : int
- $data : array<string|int, mixed>
-
integer $data[translationId] required
Tags
Return values
StringTranslationApproval|nullcreateVote()
Add Vote
public
createVote(int $projectId, array<string|int, mixed> $data) : Vote|null
Parameters
- $projectId : int
- $data : array<string|int, mixed>
-
string $data[mark] required
integer $data[translationId] required
Tags
Return values
Vote|nulldelete()
Delete Translation
public
delete(int $projectId, int $translationId) : mixed
Parameters
- $projectId : int
- $translationId : int
Tags
deleteApproval()
Remove Approval
public
deleteApproval(int $projectId, int $approvalId) : mixed
Parameters
- $projectId : int
- $approvalId : int
Tags
deleteStringTranslations()
Delete String Translations
public
deleteStringTranslations(int $projectId, int $stringId, string $languageId) : mixed
Parameters
- $projectId : int
- $stringId : int
- $languageId : string
Tags
deleteVote()
Cancel Vote
public
deleteVote(int $projectId, int $voteId) : mixed
Parameters
- $projectId : int
- $voteId : int
Tags
get()
Get Translation
public
get(int $projectId, int $translationId) : StringTranslation|null
Parameters
- $projectId : int
- $translationId : int
Tags
Return values
StringTranslation|nullgetApproval()
Approval Info
public
getApproval(int $projectId, int $approvalId) : StringTranslationApproval|null
Parameters
- $projectId : int
- $approvalId : int
Tags
Return values
StringTranslationApproval|nullgetVote()
Get Vote
public
getVote(int $projectId, int $voteId) : Vote|null
Parameters
- $projectId : int
- $voteId : int
Tags
Return values
Vote|nulllist()
List String Translations
public
list(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
-
integer $params[stringId] required
integer $params[languageId] required
integer $params[denormalizePlaceholders]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionlistApprovals()
List Translation Approvals
public
listApprovals(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
-
integer $params[fileId] Must be used together with languageId
string $params[labelIds]
string $params[excludeLabelIds]
integer $params[stringId] Must be used together with languageId
string $params[languageId] Must be used together with stringId or fileId
integer $params[translationId] If specified, fileId, stringId and languageId are ignored
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionlistLanguageTranslations()
List Language Translations
public
listLanguageTranslations(int $projectId, string $languageId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $languageId : string
- $params : array<string|int, mixed> = []
-
string $params[orderBy]
string $params[stringIds]
string $params[labelIds]
int $params[fileId]
int $params[branchId]
int $params[directoryId]
int $params[approvedOnly]
string $params[croql]
int $params[denormalizePlaceholders]
int $params[limit]
int $params[offset]
Tags
Return values
ModelCollectionlistVotes()
List Translation Votes
public
listVotes(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
-
integer $params[stringId] Must be used together with languageId
string $params[languageId] Must be used together with stringId
integer $params[translationId] If specified, stringId and languageId are ignored
string $params[labelIds]
string $params[excludeLabelIds]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionrestore()
Restore Translation
public
restore(int $projectId, int $translationId) : StringTranslation|null
Parameters
- $projectId : int
- $translationId : int