Here’s a thought … most everyone familiar with i18n implementation within WordPress is very familiar with the __ function to return a translatable text string, but not too many use the _x function as it is not as commonly considered.

The basics:

  • __ retrieves a translated string
  • _x retrieves a translated string with context

I would like to suggest that the _x function’s usage be expanded to also take into consideration PHP comments related to the string, especially those meant specifically for the translators.

I see those comments as being specifically written as context for the string to be translated. Also, in many if not all cases, the net “diff” by character will be nil (maybe negative?), so why not take advantage of this opportunity to improve the translators’ experience. Translators, for the most part, are volunteers and making their work easier can only help to entice them to do it.

… just a thought. What do you think?