Skip to content

TranslateStore being created a second time causing no translations in lazy loaded module #1441

Open
@pjc2007

Description

@pjc2007

Current behavior

I have outlined this here in this post, but not expecting much feed back from there.

In summary, as in the post, when loading my second lazy loaded module, I am seeing a second TranslateStore being created, and this being empty I get no translations. This has never happened before I upgraded to v15.0.0, and does not happen a small sample project, which makes it hard to demonstrate. I am doing exactly the same setup in the broken application as in a small sample app that works, so really have no idea of what is different to cause this (obviously my production application has a lot of other dependencies, but nothing else to do with translations)

I have spent a very long time trying to debug, but I just cannot see why a second TranslateStore is being created, as it goes very deep into the Angular DI code, which I just cant follow, so hoping there may be some suggestions on what could possibly cause this.

Expected behavior

To stop this second instance of TranslateStore being created so translation will one work in all modules.

How do you think that we should fix this?

I have no idea why the second TranslateStore is being created. I notice there is a always a new instance of TranslateService for each module being created, but this also occurs in a sample application where I do not have any problems

Environment


ngx-translate version: 15.0.0
Angular version:16.1.3

Browser:
- [ x] Chrome (desktop) version 115.0.5790.110

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions