How to find a language direction?

The text_direction property of the WP_Locale class defaults to ‘ltr’ as per it’s declaration, then may be modified in the class’s init() initialization function in wp-includes/locale.php (near line #207 in WP 4.5) with the following logic: // Set text direction. if ( isset( $GLOBALS[‘text_direction’] ) ) $this->text_direction = $GLOBALS[‘text_direction’]; /* translators: ‘rtl’ or ‘ltr’. This … Read more

Multisite use language code as subdirectory

Here’s a proper multisite solution: Install WordPress directly on the root of your domain mysite.de. After that, setup a multisite and chose the subdomain option (Yes, subdomain! It’s far more flexible and you can use it with subdirectories as well). WordPress will ask you to update wp-config.php and .htaccess. To the wp-config.php add the following … Read more

How to use load_plugin_textdomain from within a theme

It seems there is no easy way to do this as load_plugin_textdomain() won’t work as expected when called from a child theme. A generic workaround was developed by Marius Vetrici but I’ve found it to be incompatible with Polylang under some circumstances. The most reliable solution I have found is explicitly loading the translation using … Read more

WordPress admin not changing language

The problem was that I had changed the ‘WP_CONTENT_DIR’ directory, and WordPress did not have writing permission to the new content folder, so it couldn’t create the ‘WP_CONTENT_DIR’/languages folder. After creating the languages folder in my new WP_CONTENT_DIR directory WordPress did the language upgrade successfully.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)