diff --git a/components/doc/configuration/locale/setuplocaledoc.js b/components/doc/configuration/locale/setuplocaledoc.js index aa932e4091..474049265c 100644 --- a/components/doc/configuration/locale/setuplocaledoc.js +++ b/components/doc/configuration/locale/setuplocaledoc.js @@ -4,7 +4,7 @@ import { DocSectionText } from '@/components/doc/common/docsectiontext'; export function SetupLocaleDoc(props) { const code = { basic: ` -//_app.js +// _app.js import { PrimeReactProvider } from 'primereact/api'; export default function MyApp({ Component }) { @@ -15,7 +15,7 @@ export default function MyApp({ Component }) { return ( - + ); } @@ -26,9 +26,35 @@ export default function MyApp({ Component }) { <>

- To establish the default locale for your entire application, you can utilize the PrimeReactProvider. + To establish the default locale for your entire application, you can utilize the + PrimeReactProvider. +

+ +

+ When PrimeReactProvider is used, it becomes the primary source of locale configuration for all PrimeReact components. +

+ +
Locale Precedence
+

Locale resolution follows the order below:

+ + +

+ This means that once PrimeReactProvider is present, calling + locale() alone is not sufficient. The locale must be provided explicitly through the provider.

+ );