menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

LinguiJS

Community about internationalization of React and JavaScript apps using LinguiJS library

Channels
Team
Posts
Members
Info
down-caret

Simple bug at start

Hi, I've followed the steps here https://lingui.js.org/tutorials/setup-cra.html, then on to https://lingui.js.org/tutorials/react.html. This line import { Trans } from '@lingui/macro'; results in: Module not found: Can't resolve 'module' in…

message-simple
1

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!

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

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…

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,…

message-simple
1

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

message-simple
1

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…

message-simple
0

[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.…

message-simple
2

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?

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.

message-simple
1