Inconsistent translation on a WP site

When every message is hard coded in the theme files there can be no problem with gettext anymore. So, yes, depending on the theme WordPress can use different templates for home and other pages. But no, this has nothing to do with automatic translations. You have simply forgot to translate some strings, possibly in front-page.php … Read more

Locale switching with a “language” taxonomy

You might be interested in url_to_postid function Used as follows from your wpsx_redefine_locale function: $url = $_SERVER[‘REQUEST_URI’]; $postid = url_to_postid( $url ); Note that this does not return the post id for custom post types but the function is located in /wp-includes/rewrite.php and might be extended if needed. UPDATE: here’s your sample: function my_function(){ if … Read more

Can I have two different theme for two different language?

A WordPress Multi-site can handle multiple languages with individual themes and plugins activ. It’s like having multiple sites, one for every language, within one Installation. Every Site can have it’s own design, set of activ plugins and users. Read troth Method No. 5 on this Page for Details and Plugins that can help: http://codex.wordpress.org/Multilingual_WordPress

Loading custom language file for plugin

If you will use the translation only in back end, then load the translation file on the hook admin_init. If not, also on front end, then use the hook init. A example: class Fb_Example_Class { /** * Constructor, init the functions inside WP * * @return \Fb_Example_Class */ private function __construct() { // load translation … Read more

Hebrew Characters Have gone bad

I’m totally shocked. After hours of trying things and testing, I finally found the “Settings” then “Readings” option below: “Encoding for pages and feeds”. After changing from UTF-7 to UTF-8, everything looks good again. And even stranger, after changing it to UTF-8, the option disappears from the page. According to WordPress site, this option was … Read more

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