Skip to content

Commit

Permalink
Update runtime-mode.md (#1326)
Browse files Browse the repository at this point in the history
updated old references to `./generated/locales.js` with the `/generates/locale-codes.js` which is the new default and also used in the example code
  • Loading branch information
davie-robertson authored May 6, 2024
1 parent c97cd65 commit c7f3976
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ For example:
```js
import {configureLocalization} from '@lit/localize';
// Generated via output.localeCodesModule
import {sourceLocale, targetLocales} from './generated/locales.js';
import {sourceLocale, targetLocales} from './generated/locale-codes.js';

export const {getLocale, setLocale} = configureLocalization({
sourceLocale,
Expand Down Expand Up @@ -242,7 +242,7 @@ it minimizes the amount of code that your users will download and execute.

```js
import {configureLocalization} from '@lit/localize';
import {sourceLocale, targetLocales} from './generated/locales.js';
import {sourceLocale, targetLocales} from './generated/locale-codes.js';

const {getLocale, setLocale} = configureLocalization({
sourceLocale,
Expand All @@ -259,7 +259,7 @@ locale modules are being fetched.

```js
import {configureLocalization} from '@lit/localize';
import {sourceLocale, targetLocales} from './generated/locales.js';
import {sourceLocale, targetLocales} from './generated/locale-codes.js';

const localizedTemplates = new Map(
targetLocales.map((locale) => [locale, import(`/locales/${locale}.js`)])
Expand Down Expand Up @@ -290,7 +290,7 @@ some other restriction that prevents the use of dynamic imports.

```js
import {configureLocalization} from '@lit/localize';
import {sourceLocale, targetLocales} from './generated/locales.js';
import {sourceLocale, targetLocales} from './generated/locale-codes.js';

import * as templates_es_419 from './locales/es-419.js';
import * as templates_zh_hans from './locales/zh-Hans.js';
Expand Down

0 comments on commit c7f3976

Please sign in to comment.