HOW TO MAKE YOUR STRINGS
TRANSLATOR-FRIENDLY
NAOKO TAKANO / AKIRA TACHIBANA / MAYO MORIYAMA
GLOBAL WORDPRESS TRANSLATION DAY 3 | SEPTEMBER 30, 2017
NAOKO, AKIRA, MAYO
Japanese Translation Contributors !
About Us
Based in Tokyo, Japan
WHY SHOULD YOU CARE ABOUT
TRANSLATOR-FRIENDLINESS?
🤔
CLEARER STRINGS = MORE TRANSLATION
Why translator-friendliness is impor tant
MORE TRANSLATION = MORE USERS
Why translator-friendliness is impor tant
https://wordpress.org/about/stats/
TRANSLATION FRIENDLINESS
= BETTER USABILITY FOR EVERYONE
Bonus!
TYPES OF STRINGS
WE HATE THE MOST!
😝
1. No context.
2. Untranslatable text.
3. Split/broken sentences.
4. Too much (unnecessary) text.
Types of strings translator s don’t like
1. Don’t make us get confused.
2. Accommodate for non-(US-)English locales.
3. Keep your string neat & in one piece.
4. Avoid wordiness.
Basic Rules
(BAD) EXAMPLES
$%
MISSING CONTEXT FOR A WORD/PHRASE
WITH MORE THAN ONE MEANING
Problematic Types of String #1
• order (purchase order or sort order?)
• post/email/archive/comment (verb or noun?)
• author (of theme/plugin or post/page?)
• from/to (email sender/recipient or range)
• archived (past tense or adjective)
Bad Examples #1
Translation may be different for each meaning.
Translators won't know which to choose, and/or
wrong translation may appear in some locations.
Bad Example #1: Why?
Add a context to disambiguate the meanings.
Bad Example #1: How to fix it
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#disambiguation-by-context
HARD-CODED DATE/TIME, CURRENCY,
NUMBER FORMAT, ETC.
Problematic Types of String #2
• Date/time format is not editable
• Currency symbol is not gettexted
• Decimal mark is not editable
• Hard-coded period at the end
• ALL CAPS as an emphasis
Bad Examples #2
Many locales use different formats than that of the
(US) English.
Bad Example #2: Why?
Follow the best practices of i18n. Learn from how
the core/default themes handles those cases.
Bad Example #2: How to fix it
https://secure .php.net/date
SPLIT/BROKEN SENTENCES
Problematic Types of String #3
• "You can find this in” & “our documentation”
• “at”, “for”, “in”, etc. by itself
• “To proceed, %s this button”
Bad Examples #3
• Word order may be different.
• Different preposition may needed for a noun or
verb replaced by a placeholder (e.g. male/female).
Bad Example #3: Why?
Placeholder is your friend. Keep your sentence
together by using (single or multiple) placeholder(s).
Bad Example #3: How to fix it
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#best-practices-for-writing-strings
LONG, RUN-ON SENTENCES
Problematic Types of String #4
• Super long theme/plugin description stuffed with
keywords & slangs
• Unnecessary HTML markup
Bad Examples #4
• Unclear original string can be difficult to translate
or prone to mistakes.
• Translator resource is limited. Let’s make sure
meanings can be conveyed with minimum text -
this also helps English users.
Bad Example #4: Why?
Bad Example #4: How to fix it
Always keep your strings simple and clean! ✨
And there are (many) more…
• Heavily cultural jokes
• Abbreviations
• Leading & trailing white spaces
• Not enough spacing for translated text
• Unnecessary variations: capitalization/punctuation
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#best-practices-for-writing-strings
Plugin Developer Handbook
Internationalization
THANK YOU!

How to Make Your Strings Translator Friendly