Home › Forums › General Issues › How to display default language Options field, when no WPML translation exists › Reply To: How to display default language Options field, when no WPML translation exists
Hi @infoamitywebsolutions-co-uk
In this kind of situation, you can change the current language before the repeater code instead. Should be something like this:
<?
<?php
add_filter('acf/settings/current_language', function(){return 'en';});
if( have_rows('enquire_link', 'option') ):
while( have_rows('enquire_link', 'option') ): the_row();
?>
<a href="<?php the_sub_field('link'); ?>" class="enquire-button">
<?php the_sub_field('text'); ?>
</a>
<?php
endwhile;
endif;
add_filter('acf/settings/current_language', function(){return 'de';});
?>
But I think the best way would be copying the saved data from options_field_name to options_de_field_name.
I hope this makes sense 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.