Home Forums Backend Issues (wp-admin) Overdone translations Reply To: Overdone translations

  • I have the same problem, but with Russian language.
    After half of hour looking i found why is it translating:

    foreach( array('label', 'instructions') as $s ) {
    		$field[ $s ] = __($field[ $s ]);

    in acf_get_valid_field function, wich is called when field is loaded to the metabox or acf form

    Aldought it’s good that field can be translated, but it misses the important parametr – textdomain and less important – context.

    If there could be something like these:

    $field[ $s ] = __($field[ $s ], apply_filters( 'acf/translation/textdomain', 'acf-translation', $field[ $s ], $s ) );

    It would be much more effective and wouldn’t cost so much problems!
    Aldought i’m no shoure that with Code Style Localization or wpml you would be able to find and collect all transatable strings ( becouse they are variables, and variables can’t be writen or readen from gettext ).
    As one of posible solutions threre could be an exit:
    for example add a function wich will check the php file and find the string in it, and if it doasn’t have it, then write new _x( ‘$var’, ‘context’, ‘textdomain’ ); string to it ( that’s the only, known by me, way to achive these ).