How can I check if a var is equal a translated label?

You need to pass the text domain too. Assuming that you have the proper .mo and .po file, and loaded the text domain successfully: if( $_POST[“save”] === __( ‘Publish’, ‘text-domain’ ) ){ //do something } But this is not generally a good idea. You should do your checks based on something more certain, not a … Read more

Translate pages and URLs without duplicating

The first question here is why don’t you want to duplicate your pages? I would very much advise to use a plugin like PolyLang or WMPL that do exactly that. qTranslate X is a plugin that does not duplicate pages. It just copies the content of all translations into one post. https://de.wordpress.org/plugins/qtranslate-x/

How to override default WordPress core language file

Correcting the answer given by Max. To use this approach, the filter you need is gettext_with_context because your string is translated via _x() not __(). Note that the filtered argument passed is the translation, so you should check the source string ($text and $context) to ensure you’re filtering the correct item. add_filter( ‘gettext_with_context’, ‘added_translation’, 20, … Read more

How to translate timestamp?

The “%s” will be replaced by strings translated in the WordPress Core “default” text domain. e.g. “%s mins”, “%s hours”, etc.. Find these in your core translation files and translate them too.

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