Change default language mid-function
-
In the middle of a function, I need to change the language in which WPGlobus is working in. At the moment
while( have_rows( 'countries_additional_option', 'option' ) ) { the_row(); $value = get_sub_field( 'value' ); $label = get_sub_field( 'label' ); }
The label always returns in the language the site is currently in. However, I wish to return it in a different language.
AI suggested wpglobus_switch_language( ‘it’ ) but that function doesn’t seem to exist.
So how can I temporarily swap languages in the middle of a function?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change default language mid-function’ is closed to new replies.