The value for that string is normally taken from the option WPLANG
in your database table $prefix_options
. You can set it in the backend under Settings/General (wp-admin/options-general.php
) or per SQL.
There several ways to change that value per PHP:
-
Create a global variable
$locale
in yourwp-config.php
:$locale="en_GB";
-
Declare the constant
WPLANG
in yourwp-config.php
:define( 'WPLANG', 'en_GB' );
This has been deprecated, but it’ll still work.
-
Filter
locale
:add_filter( 'locale', function() { return 'en_GB'; });
This a very flexible way, because you can add more conditions to that function, for example check the current site ID in a multisite.
Related Posts:
- How can I set different html lang attribute for different countries?
- Language selection for blog doesn’t exist?
- Customize icon for “Add to home screen”
- How to set a border for an HTML div tag
- iframe refuses to display
- Setting table column width
- Which characters need to be escaped in HTML?
- Add hover text without javascript like we hover on a user’s reputation
- Creating a nav bar with flexbox
- Why is my Javascript not working?
- How to center a “position: absolute” element
- How do I make an image smaller with CSS?
- What is sr-only in Bootstrap 3?
- How to put a text beside the image?
- How to animate GIFs in HTML document?
- How to create uppercase in pure HTML
- How to change text transparency in HTML/CSS?
- Add Favicon to Website [duplicate]
- Bootstrap 4 images thumbnail classes
- Multiple radio button groups in one form
- What does the shrink-to-fit viewport meta attribute do?
- What formats can be displayed with type=”application/x-shockwave-flash”
- Placing border inside of div and not on its edge
- CSS centred header image
- Relative path in HTML
- How to move text up using CSS when nothing is working
- How to style input and submit button with CSS?
- How to display image with JavaScript?
- bootstrap navbar not working correctly
- How to play a mp3 using Javascript? [duplicate]
- How to outline text in HTML / CSS
- Play videos with iframe in html
- How to call a REST web service API from JavaScript?
- HTML iframe – disable scroll
- How to make HTML table cell editable?
- How to center content in a Bootstrap column?
- HTML5 Validation Error: body start tag seen but an element of the same type was already open
- How do I install a custom font on an HTML site
- How to align an input tag to the center without specifying the width?
- How can I embed video for discord directly from website?
- Basic CSS – how to overlay a DIV with semi-transparent DIV on top
- difference between width auto and width 100 percent
- Is there a command for formatting HTML in the Atom editor?
- How to show text on image when hovering?
- Is it still valid to use IE=edge,chrome=1?
- Fit background image to div
- Table scroll with HTML and CSS
- Set cellpadding and cellspacing in CSS?
- CSS content property: is it possible to insert HTML instead of Text?
- How to increase height of textarea using bootstrap rows and columns
- Indent List in HTML and CSS
- What’s the difference between using NAV and DIV around Bootstrap 3 navbars?
- Absolute position is not working
- Position absolute but relative to parent
- How do you specify table padding in CSS? ( table, not cell padding )
- Two Divs next to each other, that then stack with responsive change
- link not working
- Generating a Random Number for HTML
- HTML Links are not working
- How to extract svg as file from web page
- Making an image act like a button
- Is it possible to use css to shrink text to automatically fit the size of the div
- HTML5 Canvas Rotate Image
- How can I align text directly beneath an image?
- HTML vs SHTML vs PHTML
- Change background color of iframe issue
- jQuery find element by data attribute value
- WordPress footer menu floating with height of footer
- Keep HTML format when switching from Visual to HTML editor
- Mail will not send in HTML
- Custom title widget / HTML encoding
- Add HTML Snippet only on specific pages
- Beautify WordPress HTML output without any plugins
- WordPress turns HTML code to HTML entities
- Add custom html to nav_menu
- How to Include HTML in Excerpts?
- How to use code sample into WordPress post?
- Prevent WordPress from messing my HTML
- data-* attributes in blocks
- Anchor removed from DIV after Quick Edit is used
- How can I remove line breaks from manually formatted HTML?
- Most valid way for the URL html structure
- Strange iframes added in wordpress 4.1 localhost
- HTML tables in content areas
- Why does hitting enter in Visual Editor add instead of ?
- Button in SideBarOther widget not showing up on all pages
- Echoing a variable comes out with lots of white space
- display text on the same line
- WP List Pages – Add Title Attributes to Anchors
- How do I change the text content of a div for a comment validation error message?
- Get html from custom route api
- Displaying Post Content on tooltip
- HTML regex convert to titlecase
- PayPall Button Data Issue
- How to add a “Read more” button to my blog?
- Include Information Text within Registration Page
- Create HTML newsletter source from WordPress
- Why wordpress can’t display the bash command properly?
- Render HTML with wp_send_json
- Minify HTML on specific page