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 keep plugin translations after updates?
- Working with l10n contexts (_x etc)
- why is translation not working on theme?
- How do I translate: “2 hours and 15 minutes”?
- Titles in my sidebar widget appear in all languages – with qtranslate
- List of Default Translated Phrases
- Difference between 2 internationalization (i18n) functions __() & _e()
- How to extract translatable (double underscores and _e) strings?
- `wp_set_script_translations` with `wp.i18n` does not return translated strings in simple plugin
- How to load theme textdomain from plugin?
- Make theme translatable for WPML
- How to tell a theme to use different .mo and .po files?
- How can I make “Leave a comment” translation ready?
- 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?
- Prepare plugin options for multi-lingual support
- How to reload wordpress textdomains at runtime
- Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]
- Use WordPress default text domain for translating labels
- How to set a custom title per language?
- Replacing strings within posts with the translatable string
- WordPress Multilingual Theme using Multisite
- Change template copy with po/mo files
- Translating a word with locotranslate, but wordpress does display another by default
- Inconsistent translation on a WP site
- How to put a Worpdpress theme in spanish (having the po file)?
- Can’t generate pot file using wp cli
- How to avoid override string by child theme mo files when the string is empty?
- How to translate timestamp?
- How to translate WordPress Emails?
- Add a string to file .pot using Poedit
- Use the wp-admin translations on the front end
- what’s different between _x() and _()
- Localization: I want the backend: english and frontend in defined language
- WordPress Theme .mo-file won’t load
- Switch site language to en_ZA
- WordPress Translation Issue
- How to translate “$before” with get text in get_the_term_list?
- Translation with wordpress what does the process involve?
- Plugin language always shows WP site language, not profile language
- Plugin translation not working on WordPress.org
- Found a translation function that is missing a text-domain. Function _n
- Do translation functions like __e() have to take strings in English in themes?
- Can I set WordPress to display languages based on system language without a plugin?
- Trying to localize a Underscores starter theme [duplicate]
- Post types translation
- Changing interface language without multisite
- mo / po translation files does not seem to work
- Internationalize plugin so strings can be translated in WPML [closed]
- String translation for esc_html__() when registering string [closed]
- Making WP theme / plugin multii-lingual without plugins
- Structure of multilingual and multiregional directory listing website for translation
- I have English words in Kurdish pages
- WordPress does not translate
- Debug WordPress gettext function
- issue in translating a wordpress them
- Theme isn’t multilanguage ready. How can i still add a second language to the site?
- Language Pack not working
- Adding a translation phrase to WordPress Theme
- Translate Plugin with french as base language
- Tweak the loop for translation
- GlotPress – WordPress integration
- Translate placeholder text in search field
- Multilingual WordPress page – using URL to determine language?
- Having problem in using wordpress with an other language
- Archive widget numbers translation?
- What is the best option to convert my WordPress website to French Language?
- WordPress Site in Multiple Languages
- Can’t load text domain in a mu-plugin
- multisite same language different translation