How to enqueue 2 rtl css

When using a CSS creator tool, you’ll have to enqueue this style-rtl.css so WordPress knows when to load this version. All you need to do is add a snippet to the functions.php file. This allows WordPress to load the right stylesheet when it is set to RTL language. Simply add the wp_style_add_data() information to your … Read more

How to create custom backend admin menu in different languages?

You need to use the internationalisation APIs, these let you swap out hardcoded strings for localised versions, e.g. <p>Hello world</p> versus: <p><?php _e( ‘Hello world’, ‘joes_plugin’ ); ?></p> Then, you can use .po/.mo/.pot files to provide alternatives, e.g. a file with french translations, a file with russian etc. You’ll need to declare your translation text … Read more

Why .mo .po files are not working with my site?

As per Theme Handbook ⇒ Internationalization, you should call load_child_theme_textdomain() from within the after_setup_theme hook: function load_greattheme_textdomain() { load_child_theme_textdomain( ‘greattheme’, get_stylesheet_directory() . ‘/languages’ ); } add_action( ‘after_setup_theme’, ‘load_greattheme_textdomain’ ); Make sure you name your *.mo and *.po files properly (follow the link above).