Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

i18n: load translation files for JS #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atachibana
Copy link

@atachibana atachibana commented Dec 30, 2019

Block menu texts are not translated as below image (French).

Though there are translation files of French and Japanese in mo and JSON format, almost all texts are not translated except "Presentation Cover Image" menu that was translated in PHP side (register.php). See bottom of the 1st image.

We need invoke wp_register_script() and wp_set_script_translations() to load translation file of JSON format for JavaScript sources. See 2nd image for applied result.

before fix:
slide-before-fix

after fix:
slide-after-fix

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant