You should hook with the locale filter:
add_filter('locale', 'my_get_locale');
function my_get_locale($locale) {
if ( is_page( 2846) ) {
return "en_GB";
}
return $locale;
}
Related Posts:
- Show the most popular post per week
- why is translation not working on theme?
- How to change date language without changing the entire site language?
- How to let users change site language?
- Change “en-US” to “en”
- Non-Closing PHP Query in WordPress Loop
- WordPress language switcher doesn’t work
- Changing wordpress default language
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- Change WooCommerce currency programmatically on AJAX request
- How to display dual language menus and headers?
- How to Get Linked Elements for a specific ml_source_elementid
- Conditionally change WordPress core language
- Multilanguage website on two different domains
- How to translate the blog date in the Avada theme [closed]
- make my custom theme support polylang plugin
- start_lvl Ignored in Custom walker_nav_menu
- PHP Catchable fatal error: Object of class WP_Error could not be converted to string
- What would be a PHP command to erase all posts from category X from the last month?
- Load custom field value into div with AJAX
- Get the title before comma
- Accessing a random image via ajax
- wp enqueue style and style sheet depth
- Display 4 chronological posts starting with a random post
- JavaScript, best way to use data from the loop
- Setting Up PHPUnit tests for WP development on Windows
- theme options echoing multiple times
- how to echo all tables that start with a prefix
- PHP can I add line numbers to file_get_contents()
- Prevent Indexing of 404 Page
- How to show a dynamic_sidebar if main content content’s height is > a set amount?
- Custom location for attached images
- Accessing data from a non-WP database/table within a page content
- WP Query with custom Shortcode
- How to display posts by current user in a drop down
- How to add a php custom page to WordPress
- Colon is Missing In My Website Url in WordPress
- How to register javascript variables in wp_localize_script?
- Commenting out unwated CSS/scripts in HTML with PHP
- Saving plugin settings – ERROR: options page not found
- how to show only specific category for a template
- Trouble Installing WordPress Get PHP Not Running Answer
- Hardening uploads folder in IIS breaks images
- Do I have anything to worry about when switching to a default theme to test for plugin conflictions?
- Unable to process php via shortcode
- Creating a mobile site by adding a new class to the body tag from functions.php
- Using WP functions such as the_title() in an included php file
- Export Form Data to a CSV then send it as an attachment – contact form 7
- Template Loop – add switch case php
- Disable if there are no children – Woocommerce
- How to echo every parent page title?
- Alphabetically Ordered Category in WordPress
- change default RSS feed URL
- PHP Warning: Missing argument 2
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- Sorting users by a field, not by ID
- Search page results conflicting logic – Search result caching?
- OG:Audio facebook meta tags
- How do you save the values from custom fields to a products data
- understand what code is doing when prepending /blog
- $_POST returning empty values
- Show next image in array if page is revisited by same logged user
- PHP Fatal error: Uncaught Error: Call to a member function atp_variable() on null
- How to Insert an advert banner for every third Slide using JS Composer Slider
- Dynamic Banner Text based on Subdomain
- Show a text if the post has written by author user role in WordPress
- How to programmatically set existing image in media library the featured image for a post in wordpress
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- Use WP user status (logged_in) to manage access to independent application
- custom search query database in child theme
- Add Admin Option w/ Anonymous Function
- Adding an IF Function to Current Custom Category If has Child
- Else if Statement for Advanced Custom Fields [closed]
- Woocommerce custom field on emails outputs ‘Array’
- Form direction to .php on localhost
- Use html tags in shortcode_atts, is it real?
- How do I display Category titles on a WP Page?
- Can form entries from a WordPress form go to a database
- main menu page redirects to user ID
- WP Knowledge Base Theme bug – Subcategories and Articles, Need to change WP_Query
- How to have Function of a plugin using global vars into a shortcode?
- Not able to call class in NHP framework
- How can I clear the theme mod settings?
- Cant get theme to change footer color through theme customizer
- add conditionals to a displayed external xml feed
- Warning: Cannot modify header information (with a twist)
- how to get category name if my category got custom slug
- HOW TO Insert Existing PHP Code to WOrdPress
- where is the mistake in PHP Warning: Invalid argument supplied for foreach() in line 3
- Echo piece of code from file
- WPMU – How to echo only one URL
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Can WordPress support Website (19GB database) Should I move Our WordPress Website to a custom one using Laravel or any other PHP framework?
- WordPress Importer Call to undefined function set_time_limit()
- Display terms on product page with shotrcode
- How to build a dropdown with tags for same post type?
- getJSON response to PHP
- Count post with tags within one category?
- Unable to remove action from parent theme via child theme
- Is it possible to remove the “Shop” title from the WooCommerce catalogue? [closed]