News for hackers. Stuff that matters.
Re:A Localization Horror Story: It Could Happen To You (1999) by lmm on Thursday November 22, 2018 @03:41PM (#18512410)
Localisation is one of several cases where I've come to the conclusion that frameworks that are supposed to help you end up doing more harm than good. What you really want is to express a bunch of functions that conform to a common interface: you pass in a number of files and a number of directories and you get back a user-facing string.

But we already have a very well-optimised system for expressing functions: whatever programming language we're actually working in. We already have the concept of a bundle of related functions that implements a particular polymorphic interface: a class.

Make an interface that represents what you need each translation - that is, language implementation - to provide. Write implementations of that interface, in collaboration with your translators (if your language doesn't let you write code in a way that a reasonably intelligent translator can read and verify, if not write, get a better language). Less awkward than gettext, and far more effective.

Re:A Localization Horror Story: It Could Happen To You (1999) by skissane on Thursday November 22, 2018 @04:37PM (#18512730)
Many translators aren't comfortable with editing source code. They want to get a file, e.g. in XLIFF format [1], which they can then load into their translation management system, and then use a GUI or web based tool to enter the translations for each string, and then at the end export the updated file and send it back to the developers. Plus, the translation management system makes it easy to keep track of progress (what % of strings have been translated so far), automate review (require each translation to be signed off by a second translator), etc – but, translation management systems can't import/export source code, but they often can import/export message catalogs.

[1] https://en.wikipedia.org/wiki/XLIFF

Re:A Localization Horror Story: It Could Happen To You (1999) by dooglius on Thursday November 22, 2018 @09:34PM (#18513961)
I wonder if you could create some kind of domain-specific language that would be easier for a translator to interact with, without said translator needing to understand the nuances of the underlying programming language, or deal with anything more complicated than non-nested if/case statements.
Re:A Localization Horror Story: It Could Happen To You (1999) by gnoack on Friday November 23, 2018 @10:40AM (#18517017)
Re:A Localization Horror Story: It Could Happen To You (1999) by lmm on Thursday November 22, 2018 @11:47PM (#18514423)
None of my translator friends has had anything good to say about those tools, though admittedly I know a small skewed sample of more technically-inclined types.