Home Forums Backend Issues (wp-admin) Translating exported fields Reply To: Translating exported fields

  • There we go!

    Including the exported fields inside an init function did the trick:

    add_action('init', 'load_exported_fields');
    function load_exported_fields(){
    	include 'acf-exported-fields.php';

    I would like to do a request.

    As i mentioned before, you have a function that wraps certain fields in __() in your nightly build in the file:
    /core/controllers/export.php on line 387:

    // add the WP __() function to specific strings for translation in theme
    				$html = preg_replace("/'label'(.*?)('.*?')/", "'label'$1__($2)", $html);
    				$html = preg_replace("/'instructions'(.*?)('.*?')/", "'instructions'$1__($2)", $html);

    Could you make this include other necessary fields as well? For example: ‘title’, ‘choices’, ‘sub_fields’, ‘layouts/sub_fields’?

    Or are you planning on some other way to translate fields?

    I would also like to report a bug.
    When i export fields that have the following location values they show up on every page with a loading sign going on and on, see attached file. Do you know why?

    'location' => array (
    			array (
    				array (
    					'param' => 'options_page',
    					'operator' => '==',
    					'value' => 'acf-options-admin',
    					'order_no' => 0,
    					'group_no' => 0,
    				array (
    					'param' => 'user_type',
    					'operator' => '==',
    					'value' => 'administrator',
    					'order_no' => 1,
    					'group_no' => 0,

    Thank you Elliot!