UNPKG

@progress/kendo-react-intl

Version:

React Internationalization package provides services for parsing and formatting of dates and numbers. KendoReact Internationalization package

9 lines (8 loc) 1.34 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("@progress/kendo-intl"),q=require("../Intl/IntlProvider.js"),z=require("../Intl/IntlDataProvider.js"),i=require("../Intl/load.js"),I=require("../Localization/LocalizationProvider.js"),D=require("../Localization/LocalizationDataProvider.js"),C=require("../Localization/messages.js"),c=require("@progress/kendo-react-common"),L=l=>{var r,a,n;const{language:o="",locale:t="en",children:s}=l,u=g.localeInfo(t),d=(r=C.messages[o])!=null?r:[],m=((a=i.locales.version)!=null?a:[]).concat((n=i.locales[u.name])!=null?n:[]),[v]=c.useCustomComponent(t?q.IntlProvider:e.Fragment),[P]=c.useCustomComponent(o?I.LocalizationProvider:e.Fragment);return e.createElement(D.LocalizationDataProvider,{data:d,language:o},e.createElement(z.IntlDataProvider,{data:m,locale:t},e.createElement(P,{language:o},e.createElement(v,{locale:t},s))))};exports.ServerGlobalization=L;