Localization
-
Hello,
first of all, very nice plugin π
What about localization of “Related text or Call-To-Action” from admin of your plugin please?
There is wordpress function for that https://codex.ww.wp.xz.cn/Function_Reference/_2.
For example$translated = __( 'Read more', 'inline-related-posts' );And you need then enable loading of localization files:
add_action( 'plugins_loaded', 'irp_load_textdomain' ); function irp_load_textdomain() { load_plugin_textdomain( 'irp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); }That makes possibility to load then .po/.mo language file what is standard in wordpress and return to $translated variable text Read more localized.
You can check polylang plugin too. It is very good for translation so you can replace your one input with polylang API and as result in your admin there could be many inputs based on your polylang language setup.
Many thanks
Many thanks!
The topic ‘Localization’ is closed to new replies.