Theme localization of “slugs” (custom post types, taxonomies)

I wouldn’t try to localize your slugs. Instead, why not give your users the option to change them by adding another field to the permalink settings page? Hook into load-options-permalink.php and set up some things to catch the $_POST data to save your slug. Also add a settings field to the page. <?php add_action( ‘load-options-permalink.php’, … Read more

How to make a WordPress plugin translation ready?

1. Write with localization in mind Don’t use echo or print() to produce text output, instead use the WordPress functions __() and _e(): /** Not localization friendly */ echo “Welcome to my plugin”; // OR print(“Welcome to my plugin”); /** Localization friendly */ _e(‘Welcome to my plugin’, ‘my-plugin’); // OR $my_text = __(‘Welcome to my … 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

Xcode 9 – “Fixed Width Constraints May Cause Clipping” and Other Localization Warnings

I was getting the same warnings even without multiple languages in my app, which led me to find out what was really going on. . . There are a few different things going on here. I was able to silence the fixed-width warnings in my own app by changing the width of the object spacings from fixed width to greater than … Read more

en_US or en-US, which one should you use?

I’m pretty sure “-” is the standard. If you see “_” somewhere it’s probably something some people came up with to make it a valid identifier. Personally I’d go with “-“, just to be correct. http://en.wikipedia.org/wiki/IETF_language_tag

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