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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?