react-native-globalize

Internationalization/globalization helper and components for React Native

Github星跟踪图

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.

主要指标

概览
名称与所有者joshswan/react-native-globalize
主编程语言TypeScript
编程语言JavaScript (语言数: 2)
平台
许可证MIT License
所有者活动
创建于2015-09-25 01:43:32
推送于2022-02-25 17:50:19
最后一次提交2022-02-25 12:50:19
发布数49
最新版本名称v4.5.1 (发布于 2021-01-03 11:34:17)
第一版名称0.1.0 (发布于 )
用户参与
星数259
关注者数6
派生数67
提交数196
已启用问题?
问题数56
打开的问题数2
拉请求数9
打开的拉请求数0
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?