How do I translate month names in post metadata?

One easy solution, if you want the frontend to be a different language than the backend, is to change the site language under Settings > General (Spanish for example) and then change your user account’s language by going to Users > Your Profile and changing the Language setting to English. In addition, you can add … Read more

Can’t generate pot file using wp cli

The problem here is that WordPress project folder is a shared folder on Ubuntu VirtualBox guest OS with guest additions. Searching in wp cli source code, I found that to scan the directory is used: $files = new IteratorIterator( new DirectoryIterator( $this->source ) ); and I could verify that it returns only . and .. … Read more

Translations not returning translated strings

Getting tired so mistakes creep in that I don’t see. I totally missed the fact that my sprintf strings are missing the domain name. I copied the code directly from the wordpress core files, and these code don’t include any domain name. So this is the fix: Change ‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( … Read more

Translating publish dates to Arabic

Found it. Anyone with a similar problem can add this code to their site plugin or theme functions.php function convert_numbers_to_arabic( $string ) { $arabic_numbers = array(‘۰’, ‘۱’, ‘۲’, ‘۳’, ‘٤’, ‘۵’, ‘٦’, ‘۷’, ‘۸’, ‘۹’, ‘.’); $english_numbers = array(‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘.’); return str_replace($english_numbers, $arabic_numbers, $string); } add_filter( … Read more

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