diff --git a/components/doc/configuration/locale/setuplocaledoc.js b/components/doc/configuration/locale/setuplocaledoc.js new file mode 100644 index 0000000000..161f0c27f4 --- /dev/null +++ b/components/doc/configuration/locale/setuplocaledoc.js @@ -0,0 +1,35 @@ +import { DocSectionCode } from '@/components/doc/common/docsectioncode'; +import { DocSectionText } from '@/components/doc/common/docsectiontext'; + +export function SetupLocaleDoc(props) { + const code = { + basic: ` +//_app.js +import { PrimeReactProvider } from 'primereact/api'; + +export default function MyApp({ Component }) { + const value = { + locale: 'de', + ... + }; + + return ( + + + + ); +} + ` + }; + + return ( + <> + + + To establish the default locale for your entire application, you can utilize the PrimeReactProvider. + + + + > + ); +} diff --git a/pages/configuration/index.js b/pages/configuration/index.js index a0efc3c42f..da1e7d98f7 100644 --- a/pages/configuration/index.js +++ b/pages/configuration/index.js @@ -1,6 +1,5 @@ import { DocComponent } from '@/components/doc/common/doccomponent'; import { AppendToDoc } from '@/components/doc/configuration/appendtodoc'; -import { StyleContainer } from '@/components/doc/configuration/stylecontainer'; import { CSSTransitionDoc } from '@/components/doc/configuration/csstransitiondoc'; import { FilterMatchModeDoc } from '@/components/doc/configuration/filtermatchmodedoc'; import { HideOverlaysDoc } from '@/components/doc/configuration/hideoverlaysdoc'; @@ -9,9 +8,11 @@ import { AddLocaleDoc } from '@/components/doc/configuration/locale/addlocaledoc import { ImportDoc } from '@/components/doc/configuration/locale/importdoc'; import { RepositoryDoc } from '@/components/doc/configuration/locale/repositorydoc'; import { SetLocaleDoc } from '@/components/doc/configuration/locale/setlocaledoc'; +import { SetupLocaleDoc } from '@/components/doc/configuration/locale/setuplocaledoc'; import { NonceDoc } from '@/components/doc/configuration/noncedoc'; import { NullSortOrderDoc } from '@/components/doc/configuration/nullsortorderdoc'; import { RippleDoc } from '@/components/doc/configuration/rippledoc'; +import { StyleContainer } from '@/components/doc/configuration/stylecontainer'; import { ZIndexDoc } from '@/components/doc/configuration/zindexdoc'; const InstallationPage = () => { @@ -70,6 +71,11 @@ const InstallationPage = () => { id: 'Locale', label: 'Locale', children: [ + { + id: 'setup', + label: 'Setup', + component: SetupLocaleDoc + }, { id: 'import', label: 'Import',
+ To establish the default locale for your entire application, you can utilize the PrimeReactProvider. +