Save function and load_script_textdomain depends on editing admin user language #22983
Labels
[Feature] Blocks
Overall functionality of blocks
Internationalization (i18n)
Issues or PRs related to internationalization efforts
[Type] Enhancement
A suggestion for improvement.
Let's say i have a German website, But my admin user is an English speaking person, if his account is not german, then the script language JSON that is loaded is in English. So the
save()
function of the gutenberg block will translate strings in English and save them to DB.Should i not be able to do this in the custom block?
save: ( props ) => { return ( <div> <h2>{ __('Open', 'dummy-domain') }</h2> </div> ); },
Expected behavior
Display in admin area strings in admin language but save those strings in website language.
I sadly tested this only on WP 5.3.3, but i checked the i10n.php of the 5.4.1 and it seems the same. Sorry if this is already fixed.
The text was updated successfully, but these errors were encountered: