What is a Theme textdomain?

In this case, ‘themify’ is the defined textdomain for the Theme, used to make the Theme translatable. (Codex reference: load_theme_textdomain()). Making a Theme translation-ready requires a few steps. Define the Theme’s textdomain: load_theme_textdomain( ‘themify’, TEMPLATEPATH.’/languages’ ); Define translatable strings in the template. This is done using one of a few translation functions: __() (for returned … Read more

Change the text on the Publish button

If you look into /wp-admin/edit-form-advanced.php, you will find the meta box: add_meta_box(‘submitdiv’, __(‘Publish’), ‘post_submit_meta_box’, $post_type, ‘side’, ‘core’); Note the __(‘Publish’) – the function __() leads to translate() where you get the filter ‘gettext’. There are two ways to handle your problem: 1. Address the string in a single specialized function (be sure to match the … Read more

Translate a plugin using .po .mo files

The Editor There are others, but this is most used: Poedit, a cross-platform gettext catalogs (.po files) editor. The Formats .mo stands for Machine Object — compiled export of the .po file which is used by WordPress .po stands for Portable Object — editable text file with the translations strings — based on the master … Read more

What is ‘\0’ in C++?

‘\0′ equals 0. It’s a relic from C, which doesn’t have any string type at all and uses char arrays instead. The null character is used to mark the end of a string; not a very wise decision in retrospect – most other string implementations use a dedicated counter variable somewhere, which makes finding the end of … Read more

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