Visitar URL original
js-lingui/examples/react-webpack-gettext at main · lingui/js-lingui · GitHub
Skip to content

Latest commit

 

History

History

react-webpack-gettext

README.md

React Webpack Po-Gettext Example

This is a simple example of using React with Webpack and Lingui's po-gettext formatter for internationalization using compiled JavaScript files.

Settings/Example highlights

  • PO Gettext Format: using po-gettext formatter for plurals
  • Simple Webpack Setup: Minimal webpack configuration for React and TypeScript
  • Dynamic loading: loads using JSON catalog dynamically

Getting Started

  1. Install dependencies:
yarn install
  1. Start the development server (this will automatically extract and compile):
yarn start

The application will be available at http://localhost:3000

Building for Production

yarn build

Key Configuration

  • lingui.config.js: Configures po-gettext formatter and JSON compile
  • webpack.config.js: Simple webpack setup with CopyWebpackPlugin to copy compiled JSON files