Skip to content

Fix multi language feature#102

Merged
toonvandenbos merged 5 commits into
2.xfrom
fix-multi-language-feature
Dec 12, 2025
Merged

Fix multi language feature#102
toonvandenbos merged 5 commits into
2.xfrom
fix-multi-language-feature

Conversation

@Debatty-Tom

Copy link
Copy Markdown
Contributor

Solve #71 using a closure to ensure the translation respects the current locale:

Each attribute now uses setAttribute with a closure that calls the translate method. The closures are only executed when the view accesses the attributes, ensuring that the current locale has already been set and translations are rendered correctly.

@toonvandenbos toonvandenbos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one!

However, could you add a comment on the getAttribute() method, indicating why closure are resolved when accessing the attribute? The idea is to explain the translations problem for future maintainers.

@Debatty-Tom Debatty-Tom changed the base branch from main to 2.x October 22, 2025 10:07
@johannesMEGABAD

Copy link
Copy Markdown

Any updates?

@toonvandenbos toonvandenbos merged commit a4a9ced into 2.x Dec 12, 2025
18 checks passed
@toonvandenbos toonvandenbos deleted the fix-multi-language-feature branch December 12, 2025 13:20
@toonvandenbos

Copy link
Copy Markdown
Member

Hi @johannesMEGABAD, this PR is ready but will be tagged for release with the other changes prepared for v2.0.0.

@johannesMEGABAD

Copy link
Copy Markdown

Hi @johannesMEGABAD, this PR is ready but will be tagged for release with the other changes prepared for v2.0.0.

Oh wow uhh that was quick haha :D Nice!! Looking forward to it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants