question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i18n - translate document title

See original GitHub issue

What is the way to translate document title in angular 2. I can change document title with Title service but how can I translate it? Angular 2 supports translations only in component templates with i18n directive. I cannot use it in head of html document because it is outside of angular compiler scope.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
skubotcommented, Mar 4, 2017

Inside your TitleService… you can use Javascript to change the title. document.title = "New title";

0reactions
angular-automatic-lock-bot[bot]commented, Sep 11, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[i18n] Making everything translatable (website title, description...)
First of all, the i18n feature of Docusaurus is terrific, thanks a lot! It seems that the website's title can't be translated. It's...
Read more >
Best way to set translated document title (HTML tag) in React ...
Your first problem is that with the empty Array on useEffect , you tell React to only execute the code inside onMount ,...
Read more >
Editorial guidelines for i18n docs - W3C
The i18n WG works with 3 main types of page: article pages, site pages such as this one, and respec documents. They each...
Read more >
Use i18n string to translate the title or display_title of ... - Drupal
"Display title" can either mean "to display a title" or "the title to be displayed". In German, for example, these two would translate...
Read more >
Rails Internationalization (I18n) API - Ruby on Rails Guides
I18n.t 'store.title' I18n.l Time.now ... load_path # Announce your custom translation files locale # Get and set the current locale default_locale # Get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found