Support

Account

Home Forums ACF PRO Which language do I need to use for labels when using WPML

Solved

Which language do I need to use for labels when using WPML

  • I want to start implementing WPML soon, but it’s not clear to me in which language I need to write all labels.

    I know template/plugin files need to be in English, but I can’t find if it matter if labels are in a localised language (Dutch).

  • Hi @beee

    The labels should follow the current language you use on your site (the default language). Also, I suggest you use English for the field name.

    To learn more about translating custom fields, please check this page: https://www.advancedcustomfields.com/resources/multilingual-custom-fields/.

    I hope this helps πŸ™‚

  • Thanks, field names are always English. My site will most likely be in Dutch.

    I read through all the docs on ACF and WPML and since it was written in the WMPL docs that all template strings should be in English, I was doubting, since I echo all the field labels manually in my template… Hence…

    The field names are only shown when a user adds/edits a post (through the front-end).
    Knowing this, would you still advise to do it in Dutch or does this change it ?

  • Hi @beee

    The purpose of translating custom fields is so when you select certain languages, the label will be changed to the chosen language automatically. But this won’t change the field name (as long as you don’t translate the field name).

    So, if your current language (on wp-admin) is Dutch, you can set the labels in Dutch, and if your current language is English, you can set them to English.

    If you don’t want this behavior, you can always disable the translation for custom fields.

    I hope this makes sense πŸ™‚

  • I think so πŸ™‚

    And if I echo the field labels manually in my template they should be in english right, because they’re template tags ?

  • Hi @beee

    If you echo the label manually, it should be in English. But I suggest you use WordPress localization feature so it will be translated when your visitors are seeing the Dutch page. This page should give you more idea about it: https://codex.wordpress.org/I18n_for_WordPress_Developers.

    I hope this helps πŸ™‚

  • I assume you mean

    
    __($string, 'textdomain')
    

    instead of ‘just’ an English string ?

    when I say I echo my names in the templates, I meant of course properly prepared for translation…

  • Hi @beee

    I am sorry for the delayed response.

    Yes, I meant using something like that.

    Hope this clears things up πŸ™‚

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.