Skip to content

Commit

Permalink
docs: search engine optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-bodnar committed Feb 28, 2024
1 parent 88c082b commit d8afe6f
Show file tree
Hide file tree
Showing 29 changed files with 197 additions and 1 deletion.
6 changes: 6 additions & 0 deletions website/docs/guides/custom-extractor.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/custom-formatter.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/message-extraction.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/plurals.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
6 changes: 6 additions & 0 deletions website/docs/guides/pseudolocalization.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 3 additions & 1 deletion website/docs/introduction.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 22 additions & 0 deletions website/docs/misc/examples.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/misc/i18next.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/misc/react-intl.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/catalog-formats.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/cli.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/conf.md
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/core.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/eslint-plugin.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/locale-detector.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/macro.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/react.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/swc-plugin.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/ref/vite-plugin.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/cli.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/explicit-vs-generated-ids.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/javascript.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/react-native.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/react-patterns.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/react.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/setup-cra.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/setup-react.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions website/docs/tutorials/setup-vite.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
16 changes: 16 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit d8afe6f

Please sign in to comment.