Skip to content

Commit

Permalink
docs: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jul 19, 2024
1 parent f0c67ab commit 02785bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/pages/i18n/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { RepoLink, Link } from '@brillout/docpress'

You can internationalize (i18n) your app by using the <Link text={<><code>onBeforeRoute()</code> hook</>} href="/onBeforeRoute" />.

For example:

```ts
// /renderer/+onBeforeRoute.js

Expand All @@ -22,7 +24,6 @@ function onBeforeRoute(pageContext) {
}
}

// Or use a library instead of implementing your own locale retrieval mechanism
function extractLocale(url: Url) {
const { pathname } = url

Expand Down

0 comments on commit 02785bd

Please sign in to comment.