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.

Language file doesn’t work

Can you please try this code in your theme functions.php and tell us what locale do you get on the screen? die( var_dump( get_locale() ) ); If get_locale() value is not ar_AR then that explains why it won’t load your translation. and you may need to adjust/change the locale file name ( the .mo file … Read more

How to change a word in theme?

Some would say it is hard to answer based on the few information you provided. However, the answer may be general enough to cover many more problems similar to your case. First I would install this plugin. Check the screenshots section for more info: https://wordpress.org/plugins/show-current-template/screenshots/ It will provide you the list of files in use. … Read more

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

WordPress i18n in Array throws Error

This is a PHP issue, not specific to WordPress. PHP does not allow you to declare a property as an expression. It should be a literal. So you can not call a function inside a property declararion. (see Invalid property declarations in http://php.net/manual/en/language.oop5.properties.php) The solution is to create a getter method and use it instead. … Read more

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