Skip to Content Skip to Menu

Translation of field specific parameters

  • Mallard
  • Mallard
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
11 years 5 months ago #225885 by Mallard
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.8)?

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!

Please Log in or Create an account to join the conversation.

  • Mallard
  • Mallard
  • OFFLINE
  • Posts: 2
  • Thanks: 0
  • Karma: 0
11 years 5 months ago #226898 by Mallard
Replied by Mallard on topic Translation of field specific parameters
No one? Or maybe someone has any additional information on how the "This is not a valid input" text is supposed to be translated?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum