> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Language-specific configurations

> How to go global and configure Algolia to handle multiple languages.

export const Records = () => <Tooltip tip="A record is a searchable object in an Algolia index. Each record consists of named attributes." cta="Algolia records" href="/doc/guides/sending-and-managing-data/prepare-your-data#algolia-records">
    records
  </Tooltip>;

export const Index = () => <Tooltip tip="An Algolia index is a searchable dataset that consists of records and configuration settings. These settings define how the records are searched and ranked.">
    index
  </Tooltip>;

When Algolia knows the language of your data and your users, the engine can apply word-based processing techniques, such as:

* Removing common (stop) words like "the" and "a"
* Making singulars and plurals equivalent
* Detecting word roots
* Separating or combining compound words.

## Set the search language

Algolia doesn't attempt to detect the language of an <Index /> automatically.
If you want language-based settings like [typo tolerance, stop words, and plurals](/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp#dictionaries) to work correctly,
you should tell the engine which language you want these settings to use.

If you don't, the engine will use the default setting (all languages),
which may result in anomalies such as applying French spellings to English words.

You can do this individually for each setting or more globally, with one setting per index.
To learn more, see [Set the query language](/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/how-to-set-an-index-query-language)

## Remove stop words

To separate a query's key terms from its common words (such as "the", "on", and "it"),
you can instruct the engine to ignore these common words and help the engine focus on the essentials of what people are looking for: nouns and adjectives.

Algolia references several sources (including Wiktionary and ranks.nl) to create a list of stop words in all [supported languages](/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages).

For more information, see:

* [Customize stop words](/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words)
* [`removeStopWords`](/doc/api-reference/api-parameters/removeStopWords)

## Ignore plurals and other alternative forms

Algolia's [`ignorePlurals`](/doc/api-reference/api-parameters/ignorePlurals) parameter,
if enabled, tells the engine to consider a word's plural and singular forms as equivalent.

For example, in English, "cars" = "car" and "feet" = "foot".
To ensure completeness and support multiple languages,
Algolia uses [Wiktionary templates](https://wiktionary.org/wiki/Wiktionary:Templates) to declare alternative forms of a word.
For example, the template `{en-noun|s}`, would show up like this on Wiktionary's "car" page:

```txt theme={"system"}
car (plural cars)
```

With Wiktionary templates, Algolia builds a dictionary of alternative forms.
Almost every language has its own template syntax,
and many languages have multiple templates.

Wiktionary templates also support other alternative forms:

* **German declension.**
  A German noun changes form depending on its gender, number, and case.

* **Dutch diminutive endings.**
  A Dutch noun changes its ending based on whether it's small, countable, and other such nuances.
  For example, *huisje* is a small *huis*, and *colaatje* is a glass of cola.

For more information, see:

* [Customize plurals and other declensions](/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions)
* [`ignorePlurals`](/doc/api-reference/api-parameters/ignorePlurals)

## Split compound words

Compound words refer to noun phrases (or nominal groups) that combine, without spaces, several words to form a single entity or idea.

An example is the German word "Hundehütte" ("dog house").

The goal of decompounding is to index and search the individual words "Hund" and "Hütte" ("dog" and "house") separately,
thus improving the chance of a match.

For example, if a user searches for "Hütte für große Hunde" ("house for big dog"),
but in your <Records />, you only have the term "Hundehütte".
Without decompounding, Algolia can't match these records.
**The query and records can only match if the records contain the compound word "Hundehütte" in its split form.**

This setting supports six languages:

* Dutch (`nl`)
* German (`de`)
* Finnish (`fi`)
* Danish (`da`)
* Swedish (`sv`)
* Norwegian Bokmål (`no`).

Compound words are automatically split within:

* All queries where [`queryLanguages`](/doc/api-reference/api-parameters/queryLanguages) contains one of the six supported languages
* All attributes configured in [`decompoundedAttributes`](/doc/api-reference/api-parameters/decompoundedAttributes).

**Splitting compound words doesn't alter the records sent to Algolia.** Compound words aren't replaced by the segmented version but indexed in two formats: as the full word and as the atoms.

For more information, see these API parameters:

* [`queryLanguages`](/doc/api-reference/api-parameters/queryLanguages)
* [`decompoundedAttributes`](/doc/api-reference/api-parameters/decompoundedAttributes)
* [`decompoundQuery`](/doc/api-reference/api-parameters/decompoundQuery)

## Words segmentation

In some logographic languages, words in queries or sentences aren't separated by spaces as in Latin languages.
The reader distinguishes each word based on the context.
Since Algolia's relevance matches words in the query with words in the records,
it identifies which characters represent a word for a given query.

For example, "長い赤いドレス" in Japanese means "long red dress".
When receiving this query,
Algolia segments it into its composing words "長い" (long), "赤い" (red), and "ドレス" (dress).
The same segmentation happens on the records,
ensuring a great match and relevance for Japanese queries.

Algolia supports segmentation in Chinese (`zh`) and Korean (only at query time) and in Japanese (`ja`) (at both query and indexing time). You must set the [`queryLanguages`](/doc/api-reference/api-parameters/queryLanguages) and [`indexLanguages`](/doc/api-reference/api-parameters/indexLanguages) to the relevant language code to ensure this segmentation applies.

For more information, see these API parameters:

* [`queryLanguages`](/doc/api-reference/api-parameters/queryLanguages)
* [`indexLanguages`](/doc/api-reference/api-parameters/indexLanguages)

## Japanese transliteration and type-ahead

The Japanese language uses three writing systems: Kanji, Hiragana, and Katakana.
When typing a query in Japanese,
users first type its pronunciation in Hiragana and then convert it to Katakana or Kanji if relevant.

To ensure relevant results as soon as users start typing,
not just when the query is complete,
Algolia indexes Japanese words in both their original form and in Hiragana.

Transliteration is only available in Japanese (`ja`).
To apply it, set the [`indexLanguages`](/doc/api-reference/api-parameters/indexLanguages) setting to `ja`.
You can limit transliteration to some attributes or turn it off with the [`attributesToTransliterate`](/doc/api-reference/api-parameters/attributesToTransliterate) setting.

<Note>
  Multiple conjugations can end up with the same transliteration.
</Note>

You can use this feature with [Query Suggestions](/doc/guides/building-search-ui/ui-and-ux-patterns/query-suggestions/js) to ensure Japanese users start seeing suggestions from the first keystrokes.

## See also

To learn more, see these blog articles:

* [What is natural language search?](https://www.algolia.com/blog/product/what-is-natural-language-search/)
* [What is natural language processing (NLP)?](https://www.algolia.com/blog/product/what-is-natural-language-processing-and-how-is-it-leveraged-by-search-tools-software/)
* [Handling natural languages in search](https://www.algolia.com/blog/engineering/natural-languages-in-search/)
* [NLP vs natural language understanding (NLU)](https://www.algolia.com/blog/product/what-is-natural-language-understanding-and-how-is-it-different-from-nlp/)
* [Advanced keyword search is built on NLP](https://www.algolia.com/blog/ai/advanced-keyword-search-is-built-upon-natural-language-processing-nlp/)
