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 ).
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.