modules/ModuleBuilder/MB/MBLanguage.php
\MBLanguage
Package:
Properties
Methods
MBLanguage(
$name, $path, $label, $key_name
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$name | ||
$path | ||
$label | ||
$key_name |
generateAppStrings(
$buildFromTemplate
=
true
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$buildFromTemplate |
getGlobalAppListStringsForMB(
$values
)
:
void
If there is no this dropdown list in custom\modulebuilder\packages\$package\language\application\$lang.lang.php , we will include it from global app_list_string array into custom\modulebuilder\packages\$package\language\application\$lang.lang.php when we create a dropdown filed and the value is created in MB.(#20728 )
Parameters
Name | Type | Description |
---|---|---|
$values |
reload(
)
:
void
Reset the templates and load the language files again. This is called from MBModule->save() once the config file has been written.
save(
$key_name, $duplicate
=
false, $rename
=
false
)
:
void
Parameters
Name | Type | Description |
---|---|---|
$key_name | ||
$duplicate | ||
$rename |
translate(
string $label, string $language
=
"en_us"
)
:
string
Attempts to translate the given label if it is contained in this undeployed module's language strings
Parameters
Returns
Name | Type | Description |
---|---|---|
$label | string | Label to translate |
$language | string | Language to use to translate the label |
Type | Description |
---|---|
string |