TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Solutions for internationalization and localization?

4 pointsby philippnagelover 10 years ago
Hi,<p>I am mainly interested in solutions aimed at web-development.<p>How do different frameworks perform on that matter? What are some best-practices?

2 comments

jtfairbankover 10 years ago
I&#x27;m a fan of the following architecture:<p>DB &lt;==&gt; Business Logic &lt;==&gt; API &lt;==&gt; JS Services Layer (common functionality + api handling) &lt;==&gt; JS display logic &lt;==&gt; html&#x2F;css<p>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.<p>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.
rahimnathwaniover 10 years ago
W3C has good basic info on what internationalization and localization each mean: <a href="http://www.w3.org/International/questions/qa-i18n.en" rel="nofollow">http:&#x2F;&#x2F;www.w3.org&#x2F;International&#x2F;questions&#x2F;qa-i18n.en</a><p>Many developers will make a start by:<p>- 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<p>- Localizing those strings: Having one or more professional or volunteer translators create localized versions.<p>Different platforms use different file formats for localized strings. For example, a lot of web frameworks use .po files: <a href="https://www.drupal.org/node/1814954" rel="nofollow">https:&#x2F;&#x2F;www.drupal.org&#x2F;node&#x2F;1814954</a><p>Best practices:<p>- Don&#x27;t re-invent the wheel. Use libraries provided by others, e.g. <a href="https://developers.google.com/international/i18n" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;international&#x2F;i18n</a><p>- 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, ...)<p>- Don&#x27;t stop at translation. Do all the other stuff (number&#x2F;date formats, support for right-to-left languages)<p>- Of course, use UTF-8 or UTF-16<p>- Choose the right platforms&#x2F;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.<p>- Get a native speaker to do QA on the output (on the app itself, not just by looking at the strings file)<p>[0] <a href="http://android-developers.blogspot.com/2013/11/app-translation-service-now-available.html" rel="nofollow">http:&#x2F;&#x2F;android-developers.blogspot.com&#x2F;2013&#x2F;11&#x2F;app-translati...</a><p>[1] <a href="https://www.transifex.com/" rel="nofollow">https:&#x2F;&#x2F;www.transifex.com&#x2F;</a><p>[2] <a href="https://crowdin.com/" rel="nofollow">https:&#x2F;&#x2F;crowdin.com&#x2F;</a><p>FYI - I work for Google