menu

LinguiJS

Community about internationalization of React and JavaScript apps using LinguiJS library

Channels
Team
Posts
Members
Info

Chat moved to GitHub Discussions

Hey everyone, please ask you questions or send comments to GitHub Discussions in js-lingui repository. This channel is now obsolete and will be closed in few weeks/months https://github.com/lingui/js-lingui/discussions See you all there!

thumbsup
0
message-simple
0

Lingui 3.0 released

Hey everyone, new major version has just been released. See the migration docs https://lingui.js.org/releases/migration-3.html. There's also a codemod available for semi-automatic migration of codebase: https://www.npmjs.com/package/@lingui/codemods

thumbsup
1
message-simple
0

possible to make setupI18n function async??

Hi, I'm using lingui in a React component library, but there are some places where we're translating strings in plain JS. I'm able to code-split locale files in all places that use the <I18nProvider /> by wrapping it in a <I18nLoader /> HOC like the docs spell out, but have been…

thumbsup
0
message-simple
0

What is the proper way to add variables to <Select /> or <Plural />?

For example, I have a gender-dependent translation for Italian. A string that I want to translate also includes the variable. I tried: generated: "{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}": "{gender, select,…

thumbsup
0
message-simple
1

Is it just me, or is the React tutorial broken?

thumbsup
0
message-simple
1

[object Object] with standard Trans

I have a weird issue that I created a repro for here. I use a standard <Trans id="ui.message">Message</Trans> in a select and it displays [object Object]. https://codesandbox.io/s/boring-glitter-i847j It happens when I process a Trans statement as a child of another component.…

thumbsup
0
message-simple
2

How to properly use lingui v3 with Gatsby?

Hi, I've been using lingui next for some months now, in various projects, and I really like it - thanks a lot! I'm now working on a new project using Gatsby, and I'm having a hard time getting lingui to work with prerendering/SSR correctly. I understand i18n.activate(locale) is…

thumbsup
0
message-simple
0

How do you pass variables other than count to a Plural form?

I have this component, which generates an error: Invalid plural rule 'components'. Must be zero, one, two, few, many, other or exact number depending, so it obviously expects the value to be a number. But how, do I specify other values?

thumbsup
1
message-simple
0

How does <Trans>Welcome to <strong>LinguiJS</strong></Trans> works

I saw inside generated message.json above mentioned was saved as "Welcome to <0>LinguiJS</0". But does 0 is replaced with strong tag again.

thumbsup
0
message-simple
1

How to add plural and currency symbols.

I am following tutorial provided in lingui.js.org. Can anybody please let me know how to add plural and currency symbol for a number?

thumbsup
0
message-simple
0