String translation with or without po file

the .po files are just the human readable version of the translation, but it is not actually used by wordpress for anything. What you need is to generate a .mo version (it is the .po file in some binary encoding form) with a tool like poedit.

Translations in source code

This is “normal” in WordPress 5 as this is what the new wp_set_script_translations function is for. The function tells WordPress to associate a JSON file containing translations with a specific script that will make use of them. It makes use of them as you see, by embedding the translations as JavaScript objects. You say this … Read more

Archive widget numbers translation?

For archives you can use the get_archives_link filter like this: add_filter(‘get_archives_link’, ‘translate_archive_month’); function translate_archive_month($list) { $patterns = array( ‘/January/’, ‘/February/’, ‘/March/’, ‘/April/’, ‘/May/’, ‘/June/’, ‘/July/’, ‘/August/’, ‘/September/’, ‘/October/’, ‘/November/’, ‘/December/’ ); $replacements = array( //Put here whatever you want ’01’, ’02’, ’03’, ’04’, ’05’, ’06’, ’07’, ’08’, ’09’, ’10’, ’11’, ’12’ ); $list = preg_replace($patterns, … Read more

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