Internationalization of Text Strings with Emacs

科技动态 2018-06-20 阅读原文

I’ve had this topic in my blog queue for a couple of weeks but I noticed literally scores of tweets pointing to the post in question. That was enough to make me forego my own post on the subject but on rereading the original post, I realized there are some good ideas in it regardless of what’s going on with the tweets.

The post, by Dylan Kirby of MojoTech
, discusses to problem of internationalizing text strings
in an application that will be used in more than one country. Kirby discusses the problem in terms of the React framework but almost exactly similar problems occur anywhere you need internationalization. I’ve done my share of that in C where we used the GNU gettext
library. It’s always a pain and, truth to tell, I avoided working on it whenever I could slough it off to my colleagues. I’m a bad person, I know.

Regardless, Kirby and his colleagues were stuck with doing it and he noticed that it was mostly repetitive work. They used Google Translate
to provide a first order translation that was later refined by a human translation service so a first hack at the translation could be automated along with the rest of the mechanics.

You can get the details from Kirby’s post but the most important lesson from his account for me is that it serves as an answer to why you might prefer an Emacs “lisp-machine-like” environment to the pure editing environment of Vim. Kirby’s problem is representative of a common class of problems that are easy to automate with Emacs. My Vim-foo is rusty enough that I don’t see an easy way to do the same thing in Vim, especially the querying of Google Translate. You can argue that you don’t want to read emails in Emacs or use it to listen to music but, believe me, if you have to deal with internationalization, you’ll be happy to have a way of automating it as much as possible. It’s just one more reason that I’m glad to be an Emacs user.




推荐一个源代码语法高亮图片工具:carbon... 小编推荐: 掘金是一个面向程序员的高质量技术社区,从 一线大厂经验分享到前端开发最佳实践,无论是入门还是进阶,来掘金你不会错过前端开发的任何一个技术干货。 最近经常在 medium 上看到一些漂亮的源代码语法高亮...
Emacs Security If you follow the Emacs-Devel list , even in a desultory way, you probably noticed the long thread going back to ...
Nicolas Hafner: Portacle Release – Confessio... I've written about Portacle on aprevious occasion, where I talked mostly about the issues I've faced. This time, howev...
Using virtualenv with Anaconda requires LD&low... I am experiencing an issue similar to the issue described in this post and this post but which I believe is different (...
sachachua: Interview with Thierry Volpiatto by Ern... There are quite a few amazing people in the Emacs community, some with stories you’d never guess. Ernst de Hart thought ...