diff --git a/README.md b/README.md index 8944ca6a9..e21003f20 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ If you are having issues, please let us know. - Join us on [Discord][Discord] to chat with the community. - Ask questions on [StackOverflow](https://stackoverflow.com/questions/ask?tags=linguijs) and mark it with the [`linguijs`](https://stackoverflow.com/questions/tagged/linguijs) tag. - If something doesn't work as documented, documentation is missing or if you just want to suggest a new feature, [create an issue][Issues]. +- You can also [Ask Lingui JS Guru](https://gurubase.io/g/lingui-js), it is a Lingui JS focused AI to answer your questions. ## Contribute diff --git a/website/blog/2024-11-20-metro-transformer/index.md b/website/blog/2024-11-20-metro-transformer/index.md new file mode 100644 index 000000000..764a7d654 --- /dev/null +++ b/website/blog/2024-11-20-metro-transformer/index.md @@ -0,0 +1,40 @@ +--- +title: Simplify React Native i18n with the New Metro Transformer +authors: vonovak +tags: [news, features] +image: ./social-card.png +--- + +![social-card image](./social-card.png) + +# Simplified use of Lingui in React Native Apps with `@lingui/metro-transformer` + +The new `@lingui/metro-transformer` package brings a more streamlined way to consume translations from `.po` files in Expo and React Native. + +It can be used in apps across all platforms supported by React Native (Android, iOS, web and more!) - the only pre-requisite is that you use [Metro bundler](https://metrobundler.dev/) to bundle your app. + + + +Previously, React Native developers would need to follow the two-step process of extracting translations into a `.po` file (with `lingui extract`), and then compiling translated po files into JS/TS files (with `lingui compile`) for production. + +Good news! By setting up the `metro-transformer`, you now don't need to perform the second step - it's performed for you during bundling! + +:::tip Example +Check out the [React Native example app](https://github.com/lingui/js-lingui/tree/main/examples/react-native) which uses the transformer. +::: + +The `@lingui/metro-transformer` package is available as of version 4.12.0. Please let us know if you encounter any issues! + +## Getting Started + +The **TL;DR** is: install `@lingui/metro-transformer`, update `metro.config.js` and you're ready to go! + +For more details - see the official [docs](https://lingui.dev/ref/metro-transformer). + +## Exciting Future for Lingui + +In case you missed it, Lingui now offers a truly universal support for React — you can use the same syntax for React on the web, React Native, and even in React Server Components (RSC), making it a consistent solution across platforms and environments. + +Additionally, keep an eye on Lingui v5 which is packed with new features and bug fixes, and a stable release is just behind the corner. In fact, you can already try v5 with a pre-release version - see the [latest releases on GitHub](https://github.com/lingui/js-lingui/releases)! + +As always, thank you to the community for trusting Lingui! diff --git a/website/blog/2024-11-20-metro-transformer/social-card.png b/website/blog/2024-11-20-metro-transformer/social-card.png new file mode 100644 index 000000000..f90e5161d Binary files /dev/null and b/website/blog/2024-11-20-metro-transformer/social-card.png differ diff --git a/website/blog/authors.yml b/website/blog/authors.yml index a296387c7..b2edd39ea 100644 --- a/website/blog/authors.yml +++ b/website/blog/authors.yml @@ -6,3 +6,11 @@ andrii-bodnar: socials: x: AndriiBodnar1 github: andrii-bodnar +vonovak: + name: Vojtech Novak + title: Software Engineer + page: true + image_url: https://github.com/vonovak.png + socials: + x: vonovak + github: vonovak