3 ms·
Ask HN: Solutions for internationalization and localization?
Hi,
I am mainly interested in solutions aimed at web-development.
How do different frameworks perform on that matter? What are some best-practices?
- jtfairbank 12y agoI'm a fan of the following architecture: DB <==> Business Logic <==> API <==> JS Services Layer (common functionality + api handling) <==> JS display logic <==> html/css It forms a communication pipeline with very distinct layers, as opposed to a backend that mixes business logic with display logic instead of using an API. Many Frameworks implement this paradigm, and its fairly easy to roll by hand. Model View View-Model works will on the frontend- your JS code can consider anything coming from the API to be a model, the services layer can transform it into the View Model, and the display logic updates the view.
- rahimnathwani 12y agoW3C has good basic info on what internationalization and localization each mean: http://www.w3.org/International/questions/qa-i18n.en http://www.w3.org/International/questions/qa-i18n.en Many developers will make a start by: - Internationalizing their strings. In the case of Android, this is typically achieved by moving hard coded strings from the code to a separate strings.xml file - Localizing those strings: Having one or more professional or volunteer translators create localized versions. Different platforms use different file formats for localized strings. For example, a lot of web frameworks use .po files: https://www.drupal.org/node/1814954 https://www.drupal.org/node/1814954 Best practices: - Don't re-invent the wheel. Use libraries provided by others, e.g. https://developers.google.com/international/i18n https://developers.google.com/international/i18n - Decide which languages you will want to support over the long term, and think about what it will take for you to be successful (e.g. local support staff, marketing effort, ...) - Don't stop at translation. Do all the other stuff (number/date formats, support for right-to-left languages) - Of course, use UTF-8 or UTF-16 - Choose the right platforms/partners for translation. Google offers a service targeted at Android apps[0] and there are crowdsourcing platforms which may work if your users are willing to translate for you [1][2]. These work for web apps as well as native. - Get a native speaker to do QA on the output (on the app itself, not just by looking at the strings file) [0] http://android-developers.blogspot.com/2013/11/app-translation-service-now-available.html http://android-developers.blogspot.com/2013/11/app-translati... [1] https://www.transifex.com/ https://www.transifex.com/ [2] https://crowdin.com/ https://crowdin.com/ FYI - I work for Google