This whole process of internationalization and localization requires some careful doctoring of your messages, and you may find it necessary to dumb-down your HTML formatting. Consider the following message:
$msg = 'Determines where this post type should appear in the left hand admin menu.<br/> Default: null - appears below Comments. <ul style="margin-left:40px;"> <li><strong>5</strong> - below Posts</li> <li><strong>10</strong> - below Media</li> </ul>';
How can we correctly format this message to rely on __()
to provide translatable strings? We need to break it down into units, and we don't want to include any HTML as part of our translatable message. The following is what we came up with:
$msg = __('Determines where this post type should appear in the left hand admin menu.','my-textdomain'); $msg .= '<br/>'; $msg .= __('Default: null - appears below Comments.','my-textdomain'); $msg .= '<ul...