gettext()_ and the equivalent wordpress __() functions will all return the string you call with if there is no translation found. A common thought is can I use a key / token in place of the source text so that my code never needs to change and just the translations get edited. Well, yes you […]
All posts by
Translation Software & Plugins
POEDIT https://poedit.net Free / Low Cost windows software which can scan your code and then provides all the translation features you need. Seems pretty popular. WPML https://wpml.org Very popular, very featured, apparently a really good choice its hard to go wrong with and not excessively expensive. Polylang https://polylang.pro/ Another very popular wordpress choice Weglot https://weglot.com […]
.Translation functions
Quick reference Best practice tips Use entire sentences – in most languages word order is different than that in English. Split at paragraphs – merge related sentences, but do not include a whole page of text in one string. Assume strings can double in length when translated text-domain You have to specify a text-domain with […]
Language Files
The Files Used For Translating You’ll have one pair of PO/MO files per language and region, but only one (optional) POT per domain. PO (Portable Object) file A list of readable “translated objects” MO (Machine Object) file The corresponding binary (to be interpreted by Gettext when doing localization). POT (PO Template) file Contains all existing […]
Background Colour
Background with alpha
WordPress Paths
WordPress root Homepage URL Reirect to a page Site WP install URL The URL of the WordPress install. Usually identical to using site_url(), but not necessarily! User home_url() generally. URL to WP admin area For ap-admin you should use site_url(), tahts the correct usage! WordPress root – Server filesystem WordPress Theme get_stylesheet_directory_uri() is better because […]
Redirect Page
Redirect site root Redirect individual page
Circled numbers list
HTML CSS
Sessions In WordPress
WordPress does not use PHP sessions at all. It uses only cookies. Bear in mind though that some cookies might use PHP sessions. The default wordpress session timeout is 48 hours
Using Google Analytics without requiring EU cookie law consent
Note this page does not provide a legally verified solution – you should read the law and decide for yourself if these approaches are suitable before implementing yourself. The legislation Directive 2009/136/EC, which has come to be known as the Cookie Law Cookies that do not require consent under Cookies that are “strictly necessary” to […]