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.

t macro will not change on locale switch

See original GitHub issue

Describe the bug when you use the t macro inside a component, the translation text will not change when the locale is switched, unless the component also rerenders

this behavior contrasts the Trans macro behavior which always rerenders on locale switch

To Reproduce

create a component that allows you to switch the active locale

set the force render on switch to false

render a component that uses the t macro

note it does not change when the locale is switched

Expected behavior the component should always render the text corresponding to the current locale

Additional context

adding useLingui() to the top of the memoized component also causes the component to rerender on locale change, which works around the issue, but is not clear

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jinyang1994commented, Jul 19, 2021

Has the problem been fixed? @semoal

1reaction
justindominguecommented, Sep 15, 2021

Bump @semoal

Read more comments on GitHub >

github_iconTop Results From Across the Web

I have a problem with language when typing Macros In Excell ...
If you've encountered an issue when typing macros in Excel's VBA in Armenian as your native language, there's a possibility that the language ......
Read more >
Change Type Using Locale with Power Query
Step 2: Go to the date columns (use CTRL to select multiple) and right-click > Change Type > Using Locale… You should now...
Read more >
Changing locale on the fly - Stack Overflow
By "local change" I mean I had a manager with a property locale . In my strings file, the strings have prefixes like...
Read more >
[Solved] Change Language Locale in LO Calc Options
I want to change Language Locale to English India in Libreoffice Calc. We can do it by Going to Tools-Options-Languages and then changing...
Read more >
Configuring Zendesk Support for your locale and language
You can switch Zendesk Support to a different default language by ... If you don't require your end users to register and log...
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