A field is restricted to a custom perl regex with a specific warning message entered in the field "Error in case of invalid input". This defaults to "This is not a valid input". Can someone please explain how this message can be translated (using CB 1.
?
According to
this post
, it can be done. But I cannot get it to work. What I have tried so far:
As pointed out in the link above one cannot translate it using the language files with defines. I searched for the suggested translation pattern 'This is not a valid input' and found e.g. in the chinese translation for CB 1.8 around line 187 in file cbteamplugins_language.php:
Code:
// CB 1.8 Validations:
'Not a valid input' => '输入无效',
) );
the same occurs in admin_language.php
I added the custom field text _UE_SOMETHING here with the specific translation but the frontend always prints plainly what is written in the field, i.e. _UE_SOMETHING
The place where the translation should happen is obviously located in cb.core.php in lines 64 and 97:
Code:
$pregExpError = CBTxt::P( $field->params->get( 'pregexperror', 'Not a valid input' ), array( '[FIELDNAME]' => $field->title ) ); // CBTxt::T('Not a valid input')
Any help on this would be appreciated!