We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Search videos…" "Download Video" "Filed under" [for tags], "xx views" "page x of y"
Make these strings translatable with Loco Translate plugin in any Vimeography gallery theme
1.) Add 'wp-i18n' script dependency
'wp-i18n'
wp_register_script( 'my-handle', plugins_url( '/js/my-file.js', MY_PLUGIN ), array( 'wp-i18n' ) );
2.) Use translation helpers in the JS file
const { __, _x, _n, _nx } = wp.i18n; __( '__', 'my-domain' ); _x( '_x', '_x_context', 'my-domain' ); _n( '_n_single', '_n_plural', number, 'my-domain' ); _nx( '_nx_single', '_nx_plural', number, '_nx_context', 'my-domain' );
3.) Tell WP that your script handle requires a specific text-domain wp_set_script_translations( 'my-handle', 'vimeography' );
wp_set_script_translations( 'my-handle', 'vimeography' );
The text was updated successfully, but these errors were encountered:
No branches or pull requests
"Search videos…"
"Download Video"
"Filed under" [for tags],
"xx views"
"page x of y"
Make these strings translatable with Loco Translate plugin in any Vimeography gallery theme
Implementation
1.) Add
'wp-i18n'
script dependencywp_register_script( 'my-handle', plugins_url( '/js/my-file.js', MY_PLUGIN ), array( 'wp-i18n' ) );
2.) Use translation helpers in the JS file
3.) Tell WP that your script handle requires a specific text-domain
wp_set_script_translations( 'my-handle', 'vimeography' );
The text was updated successfully, but these errors were encountered: