HI
I use 2 languages: french and english
In custom_strings_inc.php i have localized the name of the fields
according to the langage by writing : $s_test = "......."
I don't know to localize custom fields values.
Thanks
Unable to localize string values of a custom field of type e
Moderators: Developer, Contributor
Re: Unable to localize string values of a custom field of ty
Code: Select all
if ( lang_get_current() === 'english' ) {
$s_test = 'english.......';
} else {
$s_test = 'other language .......';
}-
corre
Re: Unable to localize string values of a custom field of ty
I know to localize a custom field but how to localize the contents of a custom field.
For example:
if data_type is enum type: "bathymetry|velocity|tide"
It's ok to
if ( lang_get_current() === 'english' ) {
$s_data_type = 'Data type';
} else { if ( lang_get_current() === 'french') {
$s_data_type = 'Type de données';
}
but "bathymetry|velocity|tide" i don't know to localize
Thanks
For example:
if data_type is enum type: "bathymetry|velocity|tide"
It's ok to
if ( lang_get_current() === 'english' ) {
$s_data_type = 'Data type';
} else { if ( lang_get_current() === 'french') {
$s_data_type = 'Type de données';
}
but "bathymetry|velocity|tide" i don't know to localize
Thanks
Re: Unable to localize string values of a custom field of ty
Have a look at http://www.mantisbt.org/docs/master-1.2 ... DS.DYNAMIC
Something like the function custom_function_override_enum_mine is what you need.
But I fear you will not get what you expect.
Be aware that MantisBT stores the value (for example "bathymetry") of custom fields.
Something like the function custom_function_override_enum_mine is what you need.
But I fear you will not get what you expect.
Be aware that MantisBT stores the value (for example "bathymetry") of custom fields.