Support

Account

Home Forums Backend Issues (wp-admin) Localizing texts when adding fields via theme Reply To: Localizing texts when adding fields via theme

  • Hi,

    It doesn’t really matter if you are using esc_html__() or __() in this case.

    I’ve created a new theme from TwentyFifteen for you (the only things I’ve changed is the theme folder name, theme name in stylesheet and I’ve added the code at the end of the functions.php file – have a look). Download the theme from https://www.dropbox.com/s/te6m2u43u3wk7sq/twentyfifteen_acf.zip?dl=0

    How to test:

    1. Download the theme and install it. Activate it. It’s named “Twenty Fifteen FOR ACF LOCALIZATION TESTING”.
    2. Install the plugin and activate it.
    3. Add a new post/page or edit existing one to see how it looks now (I presume you are using WordPress in US English, which is default).
    4. Go to Settings > General and at the bottom set the “Site Language” to “English (UK)”.
    5. Check the post/page edit page in admin again. You will see the reference text has been translated but the metabox hasn’t ( http://easycaptures.com/fs/uploaded/984/4755682617.png ).

    Hope this will help you to trace the issue (could it be in the hook priority you are using in the plugin maybe?).

    Regards,

    Oliver