An open API service indexing awesome lists of open source software.

https://github.com/huckleberry-inc/shopify-app-locales

Locale library for Shopify app
https://github.com/huckleberry-inc/shopify-app-locales

shopify shopify-app shopify-apps

Last synced: 2 months ago
JSON representation

Locale library for Shopify app

Awesome Lists containing this project

README

        

# Welcome to @huckleberry-inc/shopify-app-locales πŸ‘‹
![Version](https://img.shields.io/badge/version-0.1.3-blue.svg?cacheSeconds=2592000)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)
![build and test](https://github.com/huckleberry-inc/shopify-app-locales/workflows/build%20and%20test/badge.svg)

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

### 🏠 [Homepage](https://github.com/huckleberry-inc/shopify-app-locales)

## Usage

```ts
import { Translator } from "@huckleberry-inc/shopify-app-locales"

// Initializes Translator instance
const translator = new Translator("ja")

// Traslates words
translator.provinces.get("Aichi") // ζ„›ηŸ₯県
translator.orderStatuses.get("open") // γ‚ͺープン
translator.financialStatuses.get("authorized") // γ‚ͺγƒΌγ‚½γƒͺ済
translator.fulfillmentStatuses.get("shipped") // η™Ίι€ζΈˆ

// Words are Map instance. You can iterate it.
translator.fulfillmentStatuses.forEach(([key, value]) => {
...
})

Array.from(translator.fulfillmentStatuses).map(([key, value]) => {
return { value, key }
}
```

## Install

```sh
yarn add @huckleberry-inc/shopify-app-locales
```

## Run tests

```sh
yarn test
```

## Author

πŸ‘€ **Huckleberry, inc. **

## 🀝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check [issues page](https://github.com/huckleberry-inc/shopify-app-locales/issues).

## Show your support

Give a ⭐️ if this project helped you!

***
_This README was generated with ❀️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_