How to syntax Json output for translation?

Technically, and this is highly discouraged do to it’s unfriendly and unpredictable nature, you can do this: <?php _e( $data[‘hair’][‘type’] ); ?> However, you’ll need to have all the possible values for that (“brown hair”, “blond hair”, etc.), listed in a .POT file (a translation template) so that translators know what to translate. You’ll need … Read more

Generate PO File

You can use POedit to generate the PO file from source code: https://codex.wordpress.org/User:Skippy/Creating_POT_Files The problem for me is that my WordPress installation is running on an Amazon Linux server, which does not have a package in the repos for POedit and I couldn’t figure out how to install POedit on my server (only on my … Read more

Implementing conditional gettext translation

WordPress provides the _x() function which is just like __(), but it adds the $context parameter which is used to differentiate between identical strings. In the example below, some output is generated in the footer. The translatable string is Message is used in both cases, but in the first instance, Message is given the context … Read more

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