Skip to content

Angular - Translation not working on refresh #24655

@cloud0259

Description

@cloud0259

Is there an existing issue for this?

  • I have searched the existing issues

Description

Hello,
There's a problem with reading translations when a page is reloaded in an Angular application.

Specifically, using localizationService.instant doesn't work.

I saw that tickets have been opened and no solution has been provided yet.
I looked into it and found something. I don't know if it's the best solution, but it works.

Reproduction Steps

No response

Expected behavior

The translation should appear upon reloading.

Actual behavior

The translation is not happening

Regression?

No response

Known Workarounds

What I propose is to add this to the app.config.ts file

 provideAppInitializer(() => {
      const configState = inject(ConfigStateService);
      return firstValueFrom(configState.getAll$()
             .pipe(filter((values) => !!values && object.keys(values).length > 0)));
    }),  

Version

10

User Interface

Angular

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions