POEDIT – Continue with translations

You can edit .po files in text editor. Structure is very simple (some header, do not touch it) and a number of translations like that: #: 404.php:21 msgid “Sorry! Page Not Found !” msgstr “” You can ignore comments started with #. msgid – string how it appears in php code msgstr – translation (if … Read more

/languages/ folder missing in default themes

Themes and plugins on wordpress.org don’t need a /language folder anymore. The translation is made via Glotpress on https://translate.wordpress.org/. Glotpress parses the files and you can start to translate. The translated .mo and .po files get automatic updates, if a translation string changes. They are stored in /wp-content/languages If you don’t host your Theme or … Read more

Translate plugin admin interface

Excerpts from Plugin Handbook The text domain must match the slug of the plugin. If your plugin is a single file called my-plugin.php or it is contained in a folder called my-plugin the domain name should be my-plugin. If your plugin is hosted on wordpress.org it must be the slug of your plugin URL (wordpress.org/plugins/). … Read more

Can I set WordPress to display languages based on system language without a plugin?

PHP can read the ‘HTTP_ACCEPT_LANGUAGE’ header from the browser request, but this might not be easy to parse if there is more than one accepted language set. For the simplest case, when one language is set as accepted, you need to read only first 2 characters from this header: $language = substr($_SERVER[‘HTTP_ACCEPT_LANGUAGE’], 0, 2); But, … Read more

How to translate wordpress error message

I was able to solve my problem, follow the code in case someone needs the solution: add_filter(‘login_errors’,’login_error_message’); function login_error_message($error){ //check if that’s the error you are looking for $pos = strpos($error, ‘incorrect’); if (is_int($pos)) { //its the right error so you can overwrite it $error = “Um ou mais campo estão em branco ou dados … Read more

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