Expose the Page Language to JavaScript
Adds a small window.wpideLang object with the current locale, language code and text direction, so your scripts can format dates, numbers or messages correctly without guessing.
Snippet Library
Snippets for multilingual sites: language switchers, translated strings and per-language behavior with WPML, Polylang and similar plugins. For sites that serve readers in more than one language.
Adds a small window.wpideLang object with the current locale, language code and text direction, so your scripts can format dates, numbers or messages correctly without guessing.
Switches to fonts that cover the script of the page or block language, for example Arabic, Hebrew, Japanese, Chinese, Korean, Thai and Hindi, while keeping your theme font for Latin text.
Registers the text of selected site options, for example a plugin's notice text or a cookie banner message, in WPML String Translation and returns the right translation on the front end.
Adds a short notice above posts that WPML displays in the default language because no translation exists yet ("display as translated" mode), so visitors know why the text is not in their language.
Registers chosen Customizer text settings, such as footer copyright or a header phone number, in Polylang's string translations and shows the right translation in each language.
Registers the text stored in selected options, such as a plugin's banner text or a footer notice, in Polylang's string translations and returns the translation on the front end.
Changes specific interface strings (button labels, notices, form text) differently for each language, without editing translation files.
Adds a "Page language" box to the editor so a single post or page written in another language gets the correct lang attribute (and text direction) for screen readers, spell checkers and search engines.
Adds a [wpide_lang only="fr,de"]...[/wpide_lang] shortcode that shows the enclosed text only when the page is displayed in one of those languages, for small differences between translations.
Hides the "_load_textdomain_just_in_time was called incorrectly" debug notice (added in WordPress 6.7) for plugins you cannot fix yourself, keeping debug logs readable.
Shows a different site title and tagline for each language the site is displayed in, without a translation plugin, by mapping locales to text.
Pre-fills the title, content and excerpt of a new translation with the source post's text when you click the "+" icon in Polylang, so translators can work over the original instead of an empty editor.
Shows a slim announcement bar at the top of every page whose text you translate in WPML > String Translation, so each language gets its own message.
Adds a [wpide_t name="..."]Text[/wpide_t] shortcode that registers its text in WPML String Translation and shows the translation, ideal for short phrases in widgets, footers and page builder text.
Registers chosen Customizer (theme_mod) text settings, such as a footer copyright or header phone number, in WPML String Translation and shows the translated value in each language.