Skip to content

Commit

Permalink
Fix typos and grammar (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmstuart authored Apr 21, 2024
1 parent 026a335 commit f9c9c86
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm version](https://img.shields.io/npm/v/i18next-browser-languagedetector.svg?style=flat-square)](https://www.npmjs.com/package/i18next-browser-languagedetector)

This is a i18next language detection plugin use to detect user language in the browser with support for:
This is an i18next language detection plugin used to detect user language in the browser, with support for:

- cookie (set cookie i18next=LANGUAGE)
- sessionStorage (set key i18nextLng=LANGUAGE)
Expand Down Expand Up @@ -39,7 +39,7 @@ i18next.use(LanguageDetector).init({
});
```

As with all modules you can either pass the constructor function (class) to the i18next.use or a concrete instance.
As with all modules you can either pass the constructor function (class) to the `i18next.use` or to a concrete instance.

[`supportedLngs`](https://www.i18next.com/overview/configuration-options#languages-namespaces-resources) is optional, but allows i18next to pick the best match from the list of detected languages. If it's not set then [`language`](https://www.i18next.com/overview/api#language) will be set to the first detected language, regardless of whether your application has translations for that language or not.

Expand All @@ -63,7 +63,7 @@ As with all modules you can either pass the constructor function (class) to the
caches: ['localStorage', 'cookie'],
excludeCacheFor: ['cimode'], // languages to not persist (cookie, localStorage)

// optional expire and domain for set cookie
// optional expiry and domain for set cookie
cookieMinutes: 10,
cookieDomain: 'myDomain',

Expand All @@ -73,7 +73,7 @@ As with all modules you can either pass the constructor function (class) to the
// optional set cookie options, reference:[MDN Set-Cookie docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie)
cookieOptions: { path: '/', sameSite: 'strict' },

// optional conversion function to use to modify the detected language code
// optional conversion function used to modify the detected language code
convertDetectedLanguage: 'Iso15897',
convertDetectedLanguage: (lng) => lng.replace('-', '_')
}
Expand Down

0 comments on commit f9c9c86

Please sign in to comment.