Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

internationalization - Why do people use plain english as translation placeholders?

This may be a stupid question, but here goes.

I've seen several projects using some translation library (e.g. gettext) working with plain english placeholders. So for example:

_("Please enter your name");

instead of abstract placeholders (which has always been my instinctive preference)

_("error_please_enter_name");

I have seen various recommendations on SO to work with the former method, but I don't understand why. What I don't get is what do you do if you need to change the english wording? Because if the actual text is used as the key for all existing translations, you would have to edit all the translations, too, and change each key. Or don't you?

Isn't that awfully cumbersome? Why is this the industry standard?

It's definitely not proper normalization to do it this way. Are there massive advantages to this method that I'm not seeing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Yes, you have to alter the existing translation files, and that is a good thing.

If you change the English wording, the translations probably need to change, too. Even if they don't, you need someone who speaks the other language to check.

You prep a new version, and part of the QA process is checking the translations. If the English wording changed and nobody checked the translation, it'll stick out like a sore thumb and it'll get fixed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...