Skip to content

Instantly share code, notes, and snippets.

@kutanov
Last active April 10, 2020 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kutanov/72fb2c42f2acd74eef90cbbe3b009506 to your computer and use it in GitHub Desktop.
Save kutanov/72fb2c42f2acd74eef90cbbe3b009506 to your computer and use it in GitHub Desktop.
{
"title": "English title",
"hello": "Welcome",
"containers": "ng-containers are useful when you don't want to have too many html layers",
"dashboard": {
"description": "You may use scopes for structuring translations"
}
}
<ng-container *transloco='let t'>
{{ t('containers') }}
</ng-container>
<br>
<ng-container *transloco='let t; lang: "ru"'>
{{ t('containers') }}
</ng-container>
{
"title": "Русский заголовок",
"hello": "Добро пожаловать!",
"containers": "ng-containers полезны когда вам не хочется иметь слишком много уровней HTML",
"dashboard": {
"description": "Вы можете использовать scopes для структурирования перевода"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment