WordPress Theme .mo-file won’t load

load_theme_textdomain() needs an absolute path to the directory, so you should set your THEME_URL like so define(“THEME_URL”, get_template_directory()); define(“TRANSLATION_URL”, THEME_URL . “/languages”); It wasn’t working for you because get_bloginfo(“template_url”) is an URL and not an absolute path on your server.

Does the textdomain have to be the theme’s name?

The text domain is a unique identifier, which makes sure WordPress can distinguish between all loaded translations so Using the basename of your plugin/theme is always a good choice because plugin/theme basename is always unique though it is not mandatory to have plugin/theme basename as text domain, you can use any unique identifier. If you’re … Read more

How can I see my theme’s text domain?

Your theme’s text domain is defined in your Theme Header in style.css. For example: /* * Plugin Name: My Plugin * Author: Otto * Text Domain: my-plugin */ The text domain should match your theme’s ‘slug’ (ie. the name of the folder where your theme is stored). Read more: https://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains

What is the correct naming procedure of text domain, directory and theme name?

From https://developer.wordpress.org/themes/functionality/internationalization/ Themes that are hosted on WordPress.org the text domain must match the slug of your theme URL (wordpress.org/themes/). This is needed so that the translations from translate.wordpress.org work correctly. The text domain name must use dashes and not underscores and be lowercase. For example, if the theme’s name My Theme is defined in the style.css or it is … Read more

Two text domains in one plugin

Yes, you can load multiple translation files for multiple text domains in one plugin. This is sometimes useful, for example when you need just one string in AJAX calls and many strings in the rest of the application: to make AJAX faster, load a separate translation. Be aware, automatic language updates for the plugin from … Read more

Plugin translations not installed but… strings are translated!

Yes, Recent Tweets Widget is one of the many plugins which their translations are managed through translate.wordpress.org, and this means that upon installing the plugin (*remember, installing and activating are different), WordPress (on your site) will automatically download the plugin’s language pack (.po and .mo files) from translate.wordpress.org, and then store the translation files in … Read more

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