Skip to content

Instantly share code, notes, and snippets.

@bettysteger
Last active October 19, 2016 09:20
Show Gist options
  • Save bettysteger/8d5c53175ce7d920b77d to your computer and use it in GitHub Desktop.
Save bettysteger/8d5c53175ce7d920b77d to your computer and use it in GitHub Desktop.
Difference between angular-translate and the new Angular i18n approach
<a href="https://lingohub.com/projects" translate="projects_link"></a>
en.json: { "projects_link": "Projects" }
LingoHub creates:
de.json: { "projects_link": "Projekte" }
<a i18n href="https://lingohub.com/projects">Projects</a>
Extraction (e.g. XLIFF - a sample excerpt):
<file source-language="en" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="a05c3a315a6ee3e6ad4733a1f72e8d16775810ca">
<source>Projects</source>
</trans-unit>
</body>
</file>
LingoHub creates:
<file source-language="en" target-language="de" datatype="plaintext" original="ng2.template">
<body>
<trans-unit id="a05c3a315a6ee3e6ad4733a1f72e8d16775810ca">
<source>Projects</source>
<target>Projekte</target>
</trans-unit>
</body>
</file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment