The locale
filter that allows you to set the locale specifically. You can check the current page, and alter the value based on that.
add_filter('locale', 'change_my_locale');
function change_my_locale( $locale ) {
if ( is_page('slug-here') ) {
return 'en_US';
}
return $locale;
}
Related Posts:
- How to get a translated string from a language other than the current one?
- Qtranslate-X get raw post title value
- HTML inside __() or _e() language translation string
- Change language by clicking a button
- Override default WordPress core translation
- How to debug failed load_theme_textdomain()?
- Set language per post
- How to set locale in ajax requests?
- Translate content, not instance, per-post
- Language Translation is not working?
- Make changes to translation?
- Where is the right .mo file inside the language repository?
- setlocale for date
- ‘Trick’ a plugin (WP-Members) to think the blog language has changed for a single page
- How to add LTR to a custom theme which in RTL by default
- Can’t have a Persian website with a completely English admin panel!
- How to override default WordPress core language file
- How can you locate the .po file used for translation of a page?
- How to translate wordpress backend to another language
- __() function inside html tags
- Load custom translation in custom plugin fails
- How to deal with differently translated prepositions?
- How to Convert Date to Thai
- Conditionally change WordPress core language
- Interface translation without plugins
- How to use translation functions inside WordPress page
- Translation not working in sprinf variable
- Website Language/Locale Switching
- How to correct translation error in WP Astra Taxonomy block
- How to translate to a language different than the current one?
- Different Language for Frontend vs Backend
- Setting WPLANG from a plugin
- Rewrite Rule for Multilingual Website, Like qTranslate?
- Custom strings for translation using Polylang plugin
- How to get a localized version of WordPress from a repository?
- How to keep plugin translations after updates?
- Localization: I want the backend: english and frontend in defined language
- Working with l10n contexts (_x etc)
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- How do I change the language of only the login page?
- How to escape the single quote character in i18n translation strings?
- Different back-end language for different users?
- How do translated, escaped strings (esc_attr) in Themes work?
- why is translation not working on theme?
- what’s different between _x() and _()
- How to handle text with function __(?
- Obtain a list of available translations
- How do I translate: “2 hours and 15 minutes”?
- Disabling Translation Update
- custom theme: english .mo file not working
- Unknown language json files
- Titles in my sidebar widget appear in all languages – with qtranslate
- How to save a translation of a plugin in “CodeStyling Localization”?
- How to escape single and plural i18n text strings?
- Force Plugin to English Translation
- List of Default Translated Phrases
- Make a custom theme translate-ready
- What are the most used WordPress localization?
- How to add extra language packs to WordPress
- What is the purpose of adding a .po file?
- load_plugin_textdomain in `plugins_loaded` or `init`?
- Difference between 2 internationalization (i18n) functions __() & _e()
- How to extract translatable (double underscores and _e) strings?
- How to Translate Contact Form 7 using qTranslate? [closed]
- Translate Navigation Menu & Sidebar Widget Titles
- Localization works but still get “This plugin is not properly prepared for localization” msg in directory
- change only the theme language
- Translations does not work with .pot file
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- Why should I escape translatable strings? and how shall i do that?
- How to load theme textdomain from plugin?
- How to handle single quote in a translatable string in WordPress
- How to change language file used by _e function
- Make theme translatable for WPML
- get_the_date() for translating date format
- Translation of plugin in MU-PLUGINS directory not working
- How to tell a theme to use different .mo and .po files?
- How can I make “Leave a comment” translation ready?
- Multisite use language code as subdirectory
- Custom translation of Month names
- Should i use _n for pronouns in translation?
- WordPress For Urdu Language
- Why load_textdomain work but not load_plugin_textdomain?
- I can’t translate text in my plugin using a .mo file, load_plugin_textdomain() function is always false
- Multiple text-domains per single plugin – admin and frontend
- How to add translation for a string
- How to find a language direction?
- How to translate a WordPress.org plugin?
- How to have english digits in some posts with an rtl WordPress theme
- Prevent WordPress updates from overriding custom language translations?
- Where the WordPress Core Translation is “actually” taking place?
- Is it possible to check is loaded language files correctly with WordPress plugin?
- How to use both British and American English?
- New plugin translation does not work
- Do i have make the content() also translation ready in theme?
- How WordPress knows where to find locale files?
- POEdit with Custom mu-plugins code
- Getting translated string through a variable
- Prepare plugin options for multi-lingual support