String not translation ready
-
Hey,
I’m translating your plugin into german and I found a string which is not nice to translate.
Take a look at this: https://plugins.trac.ww.wp.xz.cn/browser/cookie-notice/trunk/cookie-notice.php#L221
<p class="inner">' . __( 'If you are having problems with this plugin, please talk about them in the', 'cookie-notice' ) . ' <a href="http://dfactory.eu/support/" target="_blank" title="' . __( 'Support forum', 'cookie-notice' ) . '">' . __( 'Support forum', 'cookie-notice' ) . '</a></p>It is not good to split a string like this because in some languages you need to reorder words and this is not possible with your code.
Better is:
<p class="inner">' . printf( __( 'If you are having problems with this plugin, please talk about them in the <a href="%1$s" target="_blank" title"Support forum">Support forum</a>', 'cookie-notice' ), "http://dfactory.eu/support/" ) . '</p>You see I used
printf()to format a string and I labeled the URL I insert with%1$s. If you would have multiple variables you can label them with numbers and translators have the possibiltiy to reorder the variables.
The topic ‘String not translation ready’ is closed to new replies.