react-native-globalize

Internationalization/globalization helper and components for React Native

Github stars Tracking Chart

React Native Globalize

Version Downloads Build Status Coverage License

React Native Globalize provides an easy-to-use and powerful solution for internationalization (i18n) in React Native apps.

Example

Using the useGlobalize() hook:

import { useGlobalize } from 'react-native-globalize';

export const HookExample = () => {
  const { formatCurrency } = useGlobalize();

  return (
    <Text>
      {formatCurrency(1000, 'USD', {
        maximumFractionDigits: 0,
        useGrouping: true,
      })}
    </Text>
  );
};

Using a Formatted component:

import { FormattedCurrency } from 'react-native-globalize';

export const ComponentExample = () => (
  <FormattedCurrency
    currencyCode="USD"
    maximumFractionDigits={0}
    useGrouping
    value={1000}
  />
);

Docs

Supported By

License

 Copyright (c) 2015-2020 Josh Swan

 Licensed under the The MIT License (MIT) (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

    https://raw.githubusercontent.com/joshswan/react-native-globalize/master/LICENSE

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 See the License for the specific language governing permissions and
 limitations under the License.

Main metrics

Overview
Name With Ownerjoshswan/react-native-globalize
Primary LanguageTypeScript
Program languageJavaScript (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2015-09-25 01:43:32
Pushed At2022-02-25 17:50:19
Last Commit At2022-02-25 12:50:19
Release Count49
Last Release Namev4.5.1 (Posted on 2021-01-03 11:34:17)
First Release Name0.1.0 (Posted on )
用户参与
Stargazers Count259
Watchers Count6
Fork Count67
Commits Count196
Has Issues Enabled
Issues Count56
Issue Open Count2
Pull Requests Count9
Pull Requests Open Count0
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private