Skip to content

Commit

Permalink
Introduce variable
Browse files Browse the repository at this point in the history
  • Loading branch information
adr29truck committed Dec 22, 2022
1 parent bbe4d52 commit 24a615a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/react-typescript/simple/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function App() {
return (
<div className="App">
<p>{t('title')}</p>
<p>{t('description.part1')}</p>
<p>{t('description.part1', {hello: 'string'})}</p>
<p>{t('description.part2')}</p>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion example/react-typescript/simple/src/i18n/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ i18next.use(initReactI18next).init({
lng: 'en', // if you're using a language detector, do not define the lng option
debug: true,
resources,
});
});
4 changes: 2 additions & 2 deletions example/react-typescript/simple/src/i18n/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Welcome to react using react-i18next fully type-safe",
"description": {
"part1": "This is a simple example.",
"part1": "This is a simple example. {{hello}}",
"part2": "😉"
}
}
}

0 comments on commit 24a615a

Please sign in to comment.