1. Library/extensions/comment-extensions.php contains neat options to override certain strings with own translations. There are a few strings missing this on lines 238-244. They’re all ran through sprintf, but that shouldn’t hinder translation at all.
The string to be ran through sprintf should be obtained in the same way as the other strings. For example it should be possible to override
Logged in as %swith for example
Kirjauduttu sisään käyttäjänä %sfor Finnish.
Using a translation file is still a nightmare for many use cases as it gets automatically overwritten or deleted on plugin updates. WordPress core team is working on an update to allow better translation file management. In the meanwhile we would be best served with the override functions.
2. If you’ll switch the translated string
Log out?to be
Log outand then append the question mark, you can make use of WordPress core translation and be immediately translated to dozens of languages. I would also vouch for putting brackets around the text instead of a question mark after, so that we’d have it the same way as on here on WordPress.org:
Logged in as Username (Log out). And when the brackets are inside the same
span class="logout", the siteadmin can now theme this with CSS.
- The topic ‘Improve internationalization of comment form’ is closed to new replies.