What is the way to ship read-me strings like plugin-strings for internationalization?

You can ship translations of some of the metadata used in your main plugin file’s header comment fields. Namely: Name, Description, PluginURI, Author, and AuthorURI. Just add the source strings into your PO/POT files exactly as they appear in your plugin headers. When a MO file is available containing these strings, WordPress will display the … Read more

Adding another arg to comments_popup_link

Filter ‘comments_number’. You get the translated number and the real number as arguments. Return what fits best. Sample code: add_filter( ‘comments_number’, ‘wpse_31328_comments_number_i18n’, 10, 2 ); function wpse_31328_comments_number_i18n( $text, $number ) { if ( 2 === $number ) { return _x( ‘2 comments’, ‘comments number’, ‘your_text_domain’ ); // or hard coded: // return ‘2 komentarja’; } … Read more

How to translate multi-line strings?

__() and the other l18n functions will handle any string you give them, including line breaks. In my experience, poEdit recognizes them just fine, but if you’re having issues, you may consider using UNIX line break escapes \n instead of actual line breaks inside the strings; in this case, be sure to use double quotes, … Read more

POEdit with Custom mu-plugins code

I’m not 100% sure this is the only issue that was preventing POEdit from correctly parsing my code (I’m not sure it actually cares about the WordPress side of things), but fixing these (stupid) errors and re-running POEdit from the .pot file below seems to have generated the correct translation strings: define( ‘MY_TEXTDOMAIN’, ‘MY_TEXTDOMAIN’ ); … Read more

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