Careers Localization, part 1: Why Roll Our Own?27 Feb 2013
Localization is a difficult feature to add to a website. A few months ago, we at Stack Overflow Careers localized into German. This took months of effort from much of the team. I would like to describe our design and implementation over a few blog posts.
This post will discuss our design choices.
Localization consists of
- indicating text that should be localized
- translating it
- showing the correct translation to the user
There are various existing solutions in most programming languages that can do this. We looked at some, but none were able to meet all of our design and support requirements:
- Razor views
- data attributes for localized error messages on form validation
- markdown formatting (so that no HTML is ever sent to translators)
- dynamic text replacement
- gettext-style (English text in a function - no resource files and identifiers)
We discussed some of these requirements with others who had previously localized their sites. Some had decided to forfeit features due to difficulty of implementation (pluralization, dynamic text). Supporting each of these requirements is difficult, so we understood the decision to omit them. However, we were not willing to do the same.
As will be described in future posts, our implementation met all of our requirements, but with some limitations. Localization is hard, and doing everything is near impossible. If we wanted something better than the 90% solution, then what we have now is maybe in the 95% range: there are still missing features that we haven’t figured out yet.