maximeschoeni / sublanguage

Multilanguage plugin for wordpress
42 stars 13 forks source link

Translating ACF meta values #40

Open ghost opened 5 years ago

ghost commented 5 years ago

Couldn't figure out how to translate Advabced Custom Fields values. When I switch the language through language tab in page editor, Gutenberg blocks do switch but the custom fields stay the same. I'm not able to enter values for the second language. Please help.

maximeschoeni commented 5 years ago

I think you need to enter the "language option" submenu of the post type tab, and check the corresponding meta key (not the one begining by "_")

ghost commented 5 years ago

Actually I did check all the corresponding meta keys but still I cannot enter values for the second language.

maximeschoeni commented 5 years ago

Hello can you deinstall Sublanguage and confirm it's working without it?

ghost commented 5 years ago

Sorry not sure if I understand. If I uninstall Sublanguage then I won't have the language switcher tabs in page editor, and it won't be possible for me to change the acf values per language then, which is what I'm trying to accomplish.

maximeschoeni commented 5 years ago

Sorry I asked you because ACF wasn't even working without Sublanguage on my test installation, but I retry on a clean install and its ok. By the way did you uncheck the "Use asynchronous language switch" checkbox in the post meta language options?

ghost commented 5 years ago

Oh I didn't sorry. I just unchecked it now and when I view the page editor in the default language all ACF fields show up, but they don't show up at all in the second language. I only see the field group title.

maximeschoeni commented 5 years ago

Strange... Did you try to change style to "seamless no metabox" instead of "Standard WP metabox" in the ACF field group settings?

ghost commented 5 years ago

Yes, seamless no metabox is selected. Under Sublanguage Settings - Translate Post Types, do I need to check "Field Groups" and "Fields"? They were unchecked, I just checked them but nothing changed. What else do you think I should take a look at?

maximeschoeni commented 5 years ago

I don't think so... What is written on the title (when you hover on the checkbox label with the mouse and stay a bit)? Can you open the browser console and check if there is any javascript error?

ghost commented 5 years ago

Well I just realized that I need to add the fields for the second language too! Haha. Not sure why I expected the existing fields to appear magically in the second language :) Sorry for taking your time. You were such a huge help. I really really love this plugin. Thank you very much.