Fixing the File-Name Issue
-
Hello,
I am using your plugin for a long time now and I absolutely love it.
Sometimes, there is an issue when creating the mo/po files. I think, this could be solved.
The Plugin seems to create the files like the according plugin directory is called. So, if the plugin directory is named “my-pretty-wpplugin”, then the language file is named for example “my-pretty-wpplugin-de_DE” with mo/po extension.
The better way would be to read the load_plugin_textdomain function, because this is the function, where the correct file name is set.
Sometimes, a plugin is called “my-pretty-wpplugin” and the textdomain is just “mpw”. So the files should be named “mwp-de_DE”.
For users:
To correct this, open the main php file of your plugin, search for load_plugin_textdomain and rename the generated po/mo files. example:
Code is:
load_plugin_textdomain('mpwpp', false, dirname(plugin_basename(__FILE__)).'/languages/');Filename must be:
mpwpp-xx_XX
where xx_XX are the shortcuts for your language, for example de_DE.
Remember: Since 4.1, calling the WP_LANG function in wp-config.php is no longer necessary
The topic ‘Fixing the File-Name Issue’ is closed to new replies.