![]() ![]() We debated whether to use named keys for each string in the code (like Android’s strings.xml), or use the English string as the key (like iOS’s NSLocalizedString). While ICU was more powerful than gettext, it was also not directly supported by any Translation Management System (TMS) we could find, which meant we needed to turn off most of the TMS’s built in parsing and validation of translations and do that ourselves. We created ICU helpers for our templating languages, Handlebars and Smarty. After comparing it to gettext, we appreciated the power of its select and plural blocks to deal with some of our more complex strings, as well as the flexibility and robust implementations for JavaScript and PHP. We chose the ICU MessageFormat syntax to represent strings. We referred to this as “wrapping strings”, since each string needed to be wrapped in a block or function call. ![]() We needed to create frameworks for representing strings in each programming language we used, and then touch every string in the code to implement the new helpers. ![]() While mobile platforms provide clear frameworks for localization that keep strings separate from code, our web and desktop codebase’s strings were embedded in HTML templates and business logic. The first step in localizing Slack was to prepare the strings in our codebase for localization. I’d like to share some of the lessons learned, tooling, and processes we put in place to complete this project and build localization into our ongoing workflow. This week, we launched French, German, and Spanish localization in Slack. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |