Support

Account

Home Forums General Issues Qustion for WPML and underscore fields + field_523e54541fbe1

Solved

Qustion for WPML and underscore fields + field_523e54541fbe1

  • Hi
    This is a common question on diffrent forum about multilang support for ACF and how to get it to work. But no straight answer. What I understand you are not so familar with WPML (according to threads, but old ones I found).

    When making “field groups” translatable is also have to make som fields translatable too, and the WPML box are showing A LOT of ACF fields, specially when using repeater.

    The mandatory selection to “show” ACF on secondary language pages are:

    -rule
    -position
    -layout
    -hide_on_screen

    They must be set to “Translate”. Then in the box, we have a lot of:

    field_523e53ec1fbe0 (around 5 - 10 for me)

    and this little single child: (sometimes)

    -allorany

    Qustion is, the 2 latter, are they “yours” and if so, what are they doing?

    Second, in the main config of WPML for custom fields, all my id:s I created are listed, but also a copy with _underscored prefix. Like:

    ua_mobile_shortcut_menu_tab_1
    _ua_mobile_shortcut_menu_tab_1

    In my case, in this setting box, around

    
    30 st field_523e53ec1fbe0...
    65 st my_ids-created_for_all_fields...
    65 st _my_ids-created_for_all_fields...

    All are with option “Make translateable”, “copy” or “never translate”…

    Question, are the “underscored versions” yours, and if so, what are they doing?

    I did a huge setup 3 years ago (dating site) with ACF buddypress and WPML, and I just checked “Everything”, but I don wanna do that this time. – couse it seems renundant, and I wanna know what Im doing. Checking randomly just make a slowing mess.

    ACF is a little tricky when WPML “Dublicated mode” is in use, The “synced copy” must be updated / saved, to get all the ACF “rules” in placed. (Only the first rule is applying, but after saving they all shows up)

    With a little help from you, to understand the context, I hope to deliver some aswers to other forums about this 2 plugins.

    And yes for any reader, Advanced Custom Fields ACF is today 2014 compatible with WPML – WordPress Multilingual Plugin. Everything just has to be saved in the right order. You Dont have to rewrite any ACF templates.

    / Jonas

  • Hi @intervik

    Thanks for the questions, I have listed them below:

    Qustion is, the 2 latter, are they “yours” and if so, what are they doing?
    the post meta field “field_523e53ec1fbe0” is an actual field object from ACF. When you create a field in ACF, it saves it to the post_meta table with the field key as the meta_name.

    allorany – this is a location rule setting which I believe was removed in v4.2 or something similar. The all or any value was removed in favor of grouped location rules. What version of ACF are you using?

    Question, are the “underscored versions” yours, and if so, what are they doing?
    Any ‘underscore’ value is a ‘reference’ from the value to the field object, you can learn more by reading the update_field documentationhttp://www.advancedcustomfields.com/resources/functions/update_field/.

    Thanks
    E

  • Hi, thanks for answering.

    Now I know that they belongs to ACF, and I will record each step for diffrent setups wich fields that must be set as translateable to work correctly

    – The custom content itself
    – The setup itself (Views)
    – The titles and names, current labels itselfs

    The most important / or neccesssery and leave the rest alone to keep the string tables lighter in WPML

    allorany – this is a location rule setting which I believe was removed in v4.2 or something similar. The all or any value was removed in favor of grouped location rules. What version of ACF are you using?

    Im using latest versions and in a 1 week old clean install. But I also have Location addon installed, maybe a leftover is popping in.

    Next year I will publish som articles about this kind of setups, I might return with a reference link for other people to use.

    / Merry Chrismas and thanks for the great ACF plugin to our world!

  • Hello,

    What i did was mark these fields as translatable

    -rule
    -position
    -layout
    -hide_on_screen

    I have a lot of fields due to multiple repeaters..

    now when i translate the site with wpml, i only get the view of afc in the default language, not in the other language. (there i can only see the default view of wordpress custom fields)

    What did I do wrong?

  • Hi @liesju

    I think the field group data such as ‘rule’ should not be translated.
    Does it work if you leave it un translated?

    Please note that v4 is not very compatible with WPML, but ACF v5 will attempt to be 100% compatible!

    Thanks
    E

  • Hi, @liesju
    a) The translation with a LOT of rep fields and other works pretty well but it s important to do things in a certain order. elliot mentioned that the new version will be more compatible with wpml, but I can tell in our setups with very complex ACF setup it works as it is in all our “cases”.

    b) In my mind, for reading and writing this on a hollyday trip during chrismas, the

    -rule
    -position
    -layout
    -hide_on_screen

    must be “traslateable”, in the wpml settings, or I think you can activate them in the meta box on ANY ACF edit page the FIRST TIME, before saving any changes.

    c) I think the “rule” is the “show on” example type = posts and / or user = admin , and so on.

    If this is not set to be translateable, the fields never show on the “other” languages = will not be accessable or might not be recorded if you dublicate the fields to that language

    d) It easy to forget that the ACF fields must be dublicated. Just go to the edit ACF field ON THE DEFAULT ADMIN LANGUAGE (selected), choose “dublicate” (AFTER the rule, position, etc etc is radio-checked translateable). Click on the “language” ( the pen) and let the page reload to the actual language and re-save the edit screen.

    d2) do not dublicate a “translated” created ACF setup

    e) Leave the rest of “_your_field_names” as they are, do not “translate them”. (they are a lot of them if y using repeater fields)

    As long as you se the meta-boxes on the “new” languages when edit a page or post or custom post type, you are ok. But the DATA of the field must be “dublicated” AFTER this setup is ok.

    You can not “move” ACF data from the original fields ( all of them ) ONCE you cretaed the tranlated post… Make shure the setup is fine BEFORE you start to translate (including rules that ACF is ok to use AND visible, on the translated pages as well = 99,99% we want)

    Its a little tricky, but it works for us! Actually, the logic make sence, (for a tech point of view). But We cant speak for every setup.

    Hope it can help, and as I mentioned earlier in this thread, some “routines” – the order of setup – will be published with a turtrorial on our domains (my developers team deep circle….) later this year. But for now, we are in the ** of delivering projects…

    / Big user of ACF struggling with Multi-languages and WordPress

  • Thank you @intervik !

    I had to start over, but now it’s working… 🙂

    Happy 2014 !

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

The topic ‘Qustion for WPML and underscore fields + field_523e54541fbe1’ is closed to new replies.