File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
examples/01-basic/10-localization Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,17 @@ import "@blocknote/core/fonts/inter.css";
3
3
import { BlockNoteView } from "@blocknote/mantine" ;
4
4
import "@blocknote/mantine/style.css" ;
5
5
import { useCreateBlockNote } from "@blocknote/react" ;
6
+ // import { useTranslation } from "some-i18n-library"; // You can use any i18n library you like
6
7
7
8
export default function App ( ) {
9
+ // const { lang } = useTranslation('common'); // You can get the current language from the i18n library or alternatively from a router
8
10
// Creates a new editor instance.
9
11
const editor = useCreateBlockNote ( {
10
12
// Passes the Dutch (NL) dictionary to the editor instance.
11
13
// You can also provide your own dictionary here to customize the strings used in the editor,
12
14
// or submit a Pull Request to add support for your language of your choice
13
15
dictionary : locales . nl ,
16
+ // dictionary: locales[lang as keyof typeof locales], // Use the language from the i18n library dynamically
14
17
} ) ;
15
18
16
19
// Renders the editor instance using a React component.
You can’t perform that action at this time.
0 commit comments