项目作者: huckleberry-inc

项目描述 :
Locale library for Shopify app
高级语言: TypeScript
项目地址: git://github.com/huckleberry-inc/shopify-app-locales.git
创建时间: 2020-05-24T13:22:58Z
项目社区:https://github.com/huckleberry-inc/shopify-app-locales

开源协议:

下载


Welcome to @huckleberry-inc/shopify-app-locales 👋

Version
License: MIT
build and test

Locale library for Shopify app (Supports Japanese only for now)

🏠 Homepage

Usage

  1. import { Translator } from "@huckleberry-inc/shopify-app-locales"
  2. // Initializes Translator instance
  3. const translator = new Translator("ja")
  4. // Traslates words
  5. translator.provinces.get("Aichi") // 愛知県
  6. translator.orderStatuses.get("open") // オープン
  7. translator.financialStatuses.get("authorized") // オーソリ済
  8. translator.fulfillmentStatuses.get("shipped") // 発送済
  9. // Words are Map instance. You can iterate it.
  10. translator.fulfillmentStatuses.forEach(([key, value]) => {
  11. ...
  12. })
  13. Array.from(translator.fulfillmentStatuses).map(([key, value]) => {
  14. return { value, key }
  15. }

Install

  1. yarn add @huckleberry-inc/shopify-app-locales

Run tests

  1. yarn test

Author

👤 Huckleberry, inc. dev@huckleberry-inc.com

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator