@common-packages/rsuite-locale-nb-no
v0.1.0
Published
Norwegian Bokmål (nb-NO) locale for RSuite
Readme
rsuite-locale-nb-no
Norwegian Bokmål (nb-NO) locale for RSuite.js
Install
npm i @common-packages/rsuite-locale-nb-noUsage
The locale in the React Suite component defaults to English. If you need to set another locale, you can configure it with <CustomProvider>
Globally:
import { CustomProvider } from 'rsuite';
import nbNO from "@common-packages/rsuite-locale-nb-no";
return (
<CustomProvider locale={nbNO}>
<App />
</CustomProvider>
);Or just wrapped around the datepicker:
import { CustomProvider, DatePicker as ReactDatePicker } from "rsuite";
import nbNO from "@common-packages/rsuite-locale-nb-no";
import enGB from "rsuite/locales/en_GB";
const locale = i18n.language === "en" ? enGB : nbNO;
return (
<CustomProvider locale={locale}>
<ReactDatePicker
...
/>
</CustomProvider>
);