Translate third party plugin and save translation files in custom theme

First of all, I’d strongly recommend against storing translations for a plug-in in your theme. It has no reason to be there, and you’ll loose the translations when you change/update the theme. The correct place to store translations is wp-content/languages/plugins/. This code does that, and targets the domain ‘other_plugin’: function wpse159536_override_mofile_path( $mofile, $domain ){ if( … Read more

Can’t we use strings defined as PHP constants if we want to translate them in a plugin?

I think this is happening because Constants cannot be redefined later. Once they are set, they are fixed. http://php.net/manual/en/language.constants.php I’m not exactly sure how WP language constructs work, but part of me thinks that they are defined, then changed later on the fly when plugins/themes use them. I don’t have a reference for this but … Read more

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