Translating Labels set in a View (in fields and template)
-
Hi,
I’m using WPML and after creating a View where I added labels (in Fields tab), I can’t see those labels for translation in WPML even after rescanning for new strings. I read this support file (https://docs.acfviews.com/templates/multilingual), where it says:Advanced Views uses the built-in WordPress translation function
__('field label', 'themeDomain')
for all View and Card labels. This allows you to translate labels seamlessly using your preferred multilingual plugin, eliminating the need for creating a separate View or Card for every language.I thought this meant the labels would appear automatically in the strings to translate. Since that didn’t work, I did activate the File system storage, and it did create a multilingual file in my child theme with all the labels set in the Fields tab of the View and also the one I manually added to the template (ex: {{ __(‘Coordonnées’, ‘acf-views’) }}).
I noticed that in the multilingual file, the labels that I set in Fields tab of the View do not have a textdomain. Does this mean I have to manually edit this language file to add a textdomain?
The label I added manually in the template does have the textdomain I specified in the template. I wasn’t sure which textdomain to use: acf-views or my theme’s (generatepress), but either way, this label also does not show up in the string translations in WPML.
So after trying all this, none of my labels seem translatable. I must be missing something. Can you help with this?
Thanks!
- You must be logged in to reply to this topic.