\Hubleto\Framework\Interfaces\TranslatorInterface
Methods
getContext
public getContext(): string
setContext
public setContext(string $context): void
Parameters:
Parameter | Type | Description |
---|---|---|
$context |
string |
getDictionaryFilename
public getDictionaryFilename(string $context, string $language = ''): string
Parameters:
Parameter | Type | Description |
---|---|---|
$context |
string | |
$language |
string |
addToDictionary
public addToDictionary(string $string, string $context, string $toLanguage): void
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | |
$context |
string | |
$toLanguage |
string |
loadDictionary
public loadDictionary(string $language = ""): array
Parameters:
Parameter | Type | Description |
---|---|---|
$language |
string |
translate
public translate(string $string, array $vars = []): string
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | |
$vars |
array |