diff --git a/website/docs/guides/custom-extractor.md b/website/docs/guides/custom-extractor.md index fc243f14c..398738602 100644 --- a/website/docs/guides/custom-extractor.md +++ b/website/docs/guides/custom-extractor.md @@ -1,3 +1,9 @@ +--- +title: Creating a Custom Message Extractor +description: Learn how to write a custom message extractor for your project. +keywords: [extractor, extraction, message, patterns, i18n, internationalization, l10n, catalog] +--- + # Custom Extractor If your project is not working well with Lingui's Extractor, you can write your custom extractor implementation. diff --git a/website/docs/guides/custom-formatter.md b/website/docs/guides/custom-formatter.md index 6fb75b2b8..3fffa9769 100644 --- a/website/docs/guides/custom-formatter.md +++ b/website/docs/guides/custom-formatter.md @@ -1,3 +1,9 @@ +--- +title: Creating a Custom Message Formatter +description: Learn how to write a custom localization message formatter for your project. +keywords: [formatter, format, localization, internationalization, i18n, l10n, catalog, file format, custom] +--- + # Custom Formatter If your project requires some special format or handling logic, you can write your own format implementation. diff --git a/website/docs/guides/message-extraction.md b/website/docs/guides/message-extraction.md index 0c21de1ed..b64477b80 100644 --- a/website/docs/guides/message-extraction.md +++ b/website/docs/guides/message-extraction.md @@ -1,3 +1,9 @@ +--- +title: Message Extraction +description: Learn about message extraction in i18n and how to use Lingui to extract messages from your application. +keywords: [extract, extraction, message, patterns, i18n, internationalization, l10n, catalog] +--- + # Message Extraction Message extraction is an essential step in the internationalization process. It involves analyzing your code and extracting all messages defined in it so that your message catalogs are always up-to-date with the source code. diff --git a/website/docs/guides/plurals.md b/website/docs/guides/plurals.md index ccdad515e..0fcc7dd29 100644 --- a/website/docs/guides/plurals.md +++ b/website/docs/guides/plurals.md @@ -1,3 +1,9 @@ +--- +title: Pluralization +description: Learn about pluralization and how to use it in your application with Lingui. +keywords: [plural, plurals, pluralization, forms, i18n, l10n, internationalization] +--- + # Pluralization Plurals are essential when dealing with internationalization. [LinguiJS](https://github.com/lingui/js-lingui) uses [CLDR Plural Rules](https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/language_plural_rules.html). diff --git a/website/docs/guides/pseudolocalization.md b/website/docs/guides/pseudolocalization.md index 8e496e4fb..d6b978e82 100644 --- a/website/docs/guides/pseudolocalization.md +++ b/website/docs/guides/pseudolocalization.md @@ -1,3 +1,9 @@ +--- +title: Pseudolocalization +description: Learn how to use pseudolocalization to test the internationalization aspects of your application with Lingui. +keywords: [pseudolocalization, pseudo-localization, pseudolocale, pseudo-locale, i18n, l10n, testing, locale] +--- + # Pseudolocalization There is built in support for [pseudolocalization](https://en.wikipedia.org/wiki/Pseudolocalization). Pseudolocalization is a method for testing the internationalization aspects of your application by replacing your strings with altered versions and maintaining string readability. It also makes hard coded strings and improperly concatenated strings easy to spot so that they can be properly localized. diff --git a/website/docs/introduction.md b/website/docs/introduction.md index 5eeb70af1..6355c69a4 100644 --- a/website/docs/introduction.md +++ b/website/docs/introduction.md @@ -1,5 +1,7 @@ --- -title: Internationalization in Javascript +title: Internationalization Framework for Global Products +description: Lingui is a universal, clean and readable, lightweight and powerful internationalization framework for global projects. +keywords: [i18n, internationalization, l10n, localization, translation, framework, react, javascript, lingui] --- 📖 A readable, automated, and optimized (3 kb) internationalization for JavaScript diff --git a/website/docs/misc/examples.md b/website/docs/misc/examples.md index b04ee7da6..8c2576043 100644 --- a/website/docs/misc/examples.md +++ b/website/docs/misc/examples.md @@ -1,3 +1,25 @@ +--- +title: I18n Examples +description: Examples of using Lingui for internationalization (i18n) in various frameworks and libraries. +keywords: + [ + l10n, + i18n, + localization, + internationalization, + example, + react, + create-react-app, + vanilla-js, + next.js, + react-native, + babel, + swc, + vite, + rspack, + ] +--- + # Examples To help you get started with Lingui, we've provided some example projects that demonstrate how Lingui can be integrated into various frameworks and libraries. These projects demonstrate Lingui's versatility and show you how to use it in real-world scenarios. diff --git a/website/docs/misc/i18next.md b/website/docs/misc/i18next.md index 2126bc794..71eac77a1 100644 --- a/website/docs/misc/i18next.md +++ b/website/docs/misc/i18next.md @@ -1,3 +1,9 @@ +--- +title: Lingui vs i18next +description: Comparison of Lingui and i18next internationalization libraries. +keywords: [i18n, internationalization, l10n, localization, lingui, i18next, comparison, alternative] +--- + # Comparison with i18next [i18next](https://www.i18next.com/) is an internationalization-framework written in and for JavaScript. i18next and Lingui are two popular internationalization (i18n) libraries used for translating and localizing JS-based applications. Both libraries have their strengths and weaknesses, and which one is best for a particular project depends on the project's specific needs. diff --git a/website/docs/misc/react-intl.md b/website/docs/misc/react-intl.md index 9538cba2a..cd34ed3a8 100644 --- a/website/docs/misc/react-intl.md +++ b/website/docs/misc/react-intl.md @@ -1,3 +1,9 @@ +--- +title: Lingui vs react-intl +description: Comparison of Lingui and react-intl internationalization libraries. +keywords: [i18n, internationalization, l10n, localization, lingui, react-intl, comparison, alternative] +--- + # Comparison with react-intl [react-intl](https://github.com/formatjs/formatjs) (Format.js) is popular and widely-used i18n library for React. [Lingui](https://github.com/lingui/js-lingui) is in many ways very similar: both libraries use the same syntax for messages (ICU MessageFormat) and they also have very similar API. diff --git a/website/docs/ref/catalog-formats.md b/website/docs/ref/catalog-formats.md index ce80aae6f..b2214e217 100644 --- a/website/docs/ref/catalog-formats.md +++ b/website/docs/ref/catalog-formats.md @@ -1,3 +1,9 @@ +--- +title: Message Catalog Formats +description: Learn about the different catalog formats supported by Lingui. +keywords: [internationalization, localization, i18n, l10n, catalog, format, gettext, po, json, csv, lingui] +--- + # Catalog formats Catalog format (configured by the [`format`](/docs/ref/conf.md#format) option) refers to the offline catalog file format. This format is never used in production, because the catalog is compiled into a JS module. The reason behind this build step is that the choice of catalog format depends on the individual internationalization workflow. On the other hand, runtime catalog should be as simple as possible, so it can be parsed quickly without additional overhead. diff --git a/website/docs/ref/cli.md b/website/docs/ref/cli.md index 649641bc1..5035184e3 100644 --- a/website/docs/ref/cli.md +++ b/website/docs/ref/cli.md @@ -1,3 +1,9 @@ +--- +title: Lingui CLI +description: Lingui CLI manages locales, extracts messages from source files into message catalogs, and compiles message catalogs for production use. +keywords: [lingui, cli, extract, compile, i18n, internationalization, l10n, localization, translation] +--- + # Lingui CLI `@lingui/cli` manages locales, extracts messages from source files into message catalogs and compiles message catalogs for production use. diff --git a/website/docs/ref/conf.md b/website/docs/ref/conf.md index 72bd5998f..6087f3de5 100644 --- a/website/docs/ref/conf.md +++ b/website/docs/ref/conf.md @@ -1,3 +1,9 @@ +--- +title: Lingui Configuration +description: Learn how to configure Lingui for your project. +keywords: [lingui, configuration, conf, setup, translation] +--- + # Lingui Configuration Configuration is read from 4 different sources (the first found wins): diff --git a/website/docs/ref/core.md b/website/docs/ref/core.md index 9d01f7b0d..f0ea87f54 100644 --- a/website/docs/ref/core.md +++ b/website/docs/ref/core.md @@ -1,3 +1,9 @@ +--- +title: Lingui Core package +description: The package provides the main i18n object, which manages message catalogs, active locale, and message translation and formatting. +keywords: [i18n, internationalization, l10n, localization, translation, core] +--- + # The core i18n functionality `@lingui/core` package provides the main i18n object which manages message catalogs, active locale as well as translation and formatting of messages. diff --git a/website/docs/ref/eslint-plugin.md b/website/docs/ref/eslint-plugin.md index 835e11284..5ad92cd6c 100644 --- a/website/docs/ref/eslint-plugin.md +++ b/website/docs/ref/eslint-plugin.md @@ -1,3 +1,9 @@ +--- +title: Lingui ESLint Plugin +description: Lingui ESLint Plugin helps you find and prevent common i18n mistakes in your code. +keywords: [eslint, linter, i18n, internationalization, l10n, localization, translation, plugin] +--- + # ESLint Plugin Lingui provides an ESLint plugin to help you find common Lingui usage errors in your code. diff --git a/website/docs/ref/locale-detector.md b/website/docs/ref/locale-detector.md index e18f31008..456225a27 100644 --- a/website/docs/ref/locale-detector.md +++ b/website/docs/ref/locale-detector.md @@ -1,3 +1,9 @@ +--- +title: Locale Detection +description: Detect the user's locale with the `@lingui/detect-locale` package. +keywords: [locale, detection, i18n, internationalization, l10n, localization, translation] +--- + # Locale Detection `@lingui/detect-locale` is little package _just (1 kB Gzip)_ with some helper functions that will help you detect the locale of the user: diff --git a/website/docs/ref/macro.md b/website/docs/ref/macro.md index 6a9efb79e..87aa44662 100644 --- a/website/docs/ref/macro.md +++ b/website/docs/ref/macro.md @@ -1,3 +1,9 @@ +--- +title: Lingui Macro package +description: Transform JavaScript objects and JSX elements into ICU MessageFormat messages. +keywords: [babel, swc, macro, transform, i18n, internationalization, l10n, localization, translation, icu] +--- + # Macros The `@lingui/macro` package transforms JavaScript objects and JSX elements into ICU MessageFormat messages. You can use [Babel macros](#babel) or [SWC plugin](#swc) for this transformation. diff --git a/website/docs/ref/react.md b/website/docs/ref/react.md index d19c8ab48..347849860 100644 --- a/website/docs/ref/react.md +++ b/website/docs/ref/react.md @@ -1,3 +1,9 @@ +--- +title: Lingui React API +description: Reference for the Lingui React API and components. +keywords: [react, i18n, internationalization, l10n, localization, translation, I18nProvider, trans, plurals, useLingui] +--- + # React API Reference Components from `@lingui/react` wrap the vanilla JS API from `@lingui/core`. React components handle changes of active language or interpolated variables better than low-level API and also take care of re-rendering when locale or messages change. diff --git a/website/docs/ref/swc-plugin.md b/website/docs/ref/swc-plugin.md index 589ba6cd1..9297dafc7 100644 --- a/website/docs/ref/swc-plugin.md +++ b/website/docs/ref/swc-plugin.md @@ -1,3 +1,9 @@ +--- +title: Lingui SWC Plugin +description: Use Lingui Macros in your SWC project. +keywords: [swc, plugin, i18n, internationalization, l10n, localization, translation, lingui, macros, next.js, vite] +--- + # SWC Plugin [SWC](https://swc.rs/) is an extensible Rust-based platform for the next generation of fast developer tools. diff --git a/website/docs/ref/vite-plugin.md b/website/docs/ref/vite-plugin.md index 8b85b7652..1e8d17cdd 100644 --- a/website/docs/ref/vite-plugin.md +++ b/website/docs/ref/vite-plugin.md @@ -1,3 +1,9 @@ +--- +title: Lingui Vite Plugin +description: Use Lingui with Vite and compile your message catalogs on the fly. +keywords: [vite, plugin, i18n, internationalization, l10n, compilation] +--- + # Vite Plugin `@lingui/vite-plugin` is a Vite plugin, which compiles Lingui catalogs on the fly and provides additional required configuration for Vite. diff --git a/website/docs/tutorials/cli.md b/website/docs/tutorials/cli.md index 112ce1f52..0ea88a0a3 100644 --- a/website/docs/tutorials/cli.md +++ b/website/docs/tutorials/cli.md @@ -1,3 +1,9 @@ +--- +title: Working with Lingui CLI +description: Learn how to extract, merge and compile message catalogs with Lingui CLI. +keywords: [cli, extract, compile, message catalogs, translation, tutorial] +--- + # Working with LinguiJS CLI `@lingui/cli` provides the `lingui` command for extracting, merging and compiling message catalogs. Follow [setup instructions](/docs/ref/cli.md) to install required packages. diff --git a/website/docs/tutorials/explicit-vs-generated-ids.md b/website/docs/tutorials/explicit-vs-generated-ids.md index 2430070f2..546144b88 100644 --- a/website/docs/tutorials/explicit-vs-generated-ids.md +++ b/website/docs/tutorials/explicit-vs-generated-ids.md @@ -1,3 +1,9 @@ +--- +title: Choosing between generated and explicit IDs +description: Learn about the differences between explicit and generated IDs and how to choose the right approach for your project. +keywords: [i18n, internationalization, l10n, localization, translation, tutorial, id, generated, explicit] +--- + # Choosing between generated and explicit IDs In this guide, we will explore the fundamental concepts of explicit and generated IDs, and then delve into a comprehensive comparison, highlighting the benefits and drawbacks of each approach. diff --git a/website/docs/tutorials/javascript.md b/website/docs/tutorials/javascript.md index 5b5fd06e0..3738edad9 100644 --- a/website/docs/tutorials/javascript.md +++ b/website/docs/tutorials/javascript.md @@ -1,3 +1,9 @@ +--- +title: JavaScript Internationalization (i18n) +description: Learn how to use Lingui's internationalization features in your vanilla JavaScript application. +keywords: [javascript, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Internationalization of JavaScript apps In this tutorial, we'll learn how to use LinguiJS's internationalization features that do not depend on React. We'll take a minimalist approach and cover the main functions from the `@lingui/core` package. diff --git a/website/docs/tutorials/react-native.md b/website/docs/tutorials/react-native.md index e6819f144..602a31415 100644 --- a/website/docs/tutorials/react-native.md +++ b/website/docs/tutorials/react-native.md @@ -1,3 +1,9 @@ +--- +title: React Native Internationalization (i18n) +description: Learn how to add internationalization to a React Native application using Lingui. +keywords: [react native, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Internationalization of React Native apps In this tutorial, we'll learn how to add internationalization to an existing application in React Native. Before going further, please follow the [setup guide](/docs/tutorials/setup-react.md) for installation and setup instructions. diff --git a/website/docs/tutorials/react-patterns.md b/website/docs/tutorials/react-patterns.md index c26685a87..a162f75d9 100644 --- a/website/docs/tutorials/react-patterns.md +++ b/website/docs/tutorials/react-patterns.md @@ -1,3 +1,9 @@ +--- +title: Common i18n patterns in React +description: Learn about the most common i18n patterns in React and how to use them with Lingui. +keywords: [react, i18n, internationalization, patterns, l10n, localization, translation, tutorial] +--- + # Common i18n patterns in React This page describes the most common i18n patterns in React. It's a follow-up to the [tutorial](/docs/tutorials/react.md) with practical examples. See the [API reference](/docs/ref/react.md) for detailed information about all components. diff --git a/website/docs/tutorials/react.md b/website/docs/tutorials/react.md index f5d2dfbea..ccf42cef6 100644 --- a/website/docs/tutorials/react.md +++ b/website/docs/tutorials/react.md @@ -1,3 +1,9 @@ +--- +title: React i18n with Lingui +description: Learn how to add internationalization to a React application using Lingui. +keywords: [react, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Internationalization of React apps In this tutorial, we'll learn how to add internationalization (i18n) to an existing React JS application. diff --git a/website/docs/tutorials/setup-cra.md b/website/docs/tutorials/setup-cra.md index 4de7e5379..da3ab200b 100644 --- a/website/docs/tutorials/setup-cra.md +++ b/website/docs/tutorials/setup-cra.md @@ -1,3 +1,9 @@ +--- +title: Create React App Internationalization (i18n) +description: Learn how to set up internationalization with Lingui for your Create React App project. +keywords: [react, create react app, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Setup with Create React App [Create React App](https://github.com/facebook/create-react-app) is a framework for writing React apps with no build configuration. This guide assumes you use Create React App 2.0 (the default version). diff --git a/website/docs/tutorials/setup-react.md b/website/docs/tutorials/setup-react.md index 986e114be..27bacc47a 100644 --- a/website/docs/tutorials/setup-react.md +++ b/website/docs/tutorials/setup-react.md @@ -1,3 +1,9 @@ +--- +title: Setup i18n in a React project +description: Learn how to add internationalization to a React application using Lingui. +keywords: [react, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Setup with React project :::info diff --git a/website/docs/tutorials/setup-vite.md b/website/docs/tutorials/setup-vite.md index 3f2cb1c78..678c7c582 100644 --- a/website/docs/tutorials/setup-vite.md +++ b/website/docs/tutorials/setup-vite.md @@ -1,3 +1,9 @@ +--- +title: Vite project Internationalization (i18n) +description: Learn how to set up internationalization with Lingui for your Vite project. +keywords: [vite, swc, react, config, setup, i18n, internationalization, l10n, localization, translation, tutorial] +--- + # Setup with Vite The Lingui Vite integration: diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 4a19c031c..72697de53 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -22,6 +22,22 @@ const config: Config = { backgroundColor: "#f36c6c", textColor: "#1a1a1a", }, + metadata: [ + { + name: "title", + content: "Lingui - Internationalization Framework for Global Products", + }, + { + name: "description", + content: + "Lingui is a modern internationalization framework for global products. It provides the best developer experience for managing translations and supports all major frameworks.", + }, + { + name: "keywords", + content: + "internationalization, localization, multilingual, translation, i18n, l10n, react, react native, vue, next.js, ICU, javascript, typescript, pseudolocalization, internationalization framework", + }, + ], navbar: { title: "", logo: {