ra-language-farsi
Advanced tools
Comparing version 0.4.0 to 1.0.0
{ | ||
"name": "ra-language-farsi", | ||
"version": "0.4.0", | ||
"version": "1.0.0", | ||
"description": "Farsi translations for React-Admin, the frontend framework for building admin applications on top of REST/GraphQL services.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,6 +5,7 @@ # Farsi Translations for React-Admin | ||
![react-admin demo](http://static.marmelab.com/react-admin.gif) | ||
[![react-admin-demo](https://marmelab.com/react-admin/img/react-admin-demo-still.png)](https://vimeo.com/268958716) | ||
## Installation | ||
### npm | ||
```sh | ||
@@ -14,2 +15,7 @@ npm install --save ra-language-farsi | ||
### yarn | ||
```sh | ||
yarn add ra-language-farsi | ||
``` | ||
## Usage | ||
@@ -19,2 +25,3 @@ | ||
import farsiMessages from 'ra-language-farsi'; | ||
import polyglotI18nProvider from 'ra-i18n-polyglot'; | ||
@@ -25,5 +32,5 @@ const messages = { | ||
const i18nProvider = locale => messages[locale]; | ||
const i18nProvider = polyglotI18nProvider(locale => messages[locale], 'fa'); | ||
<Admin locale="fa" i18nProvider={i18nProvider}> | ||
<Admin i18nProvider={i18nProvider}> | ||
... | ||
@@ -37,2 +44,20 @@ </Admin> | ||
1. Change **dir** property to **rtl** in your root elements (like body). You can also connect this property to redux. | ||
*public/index.html* | ||
```html | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="root" dir="rtl"></div> | ||
</body> | ||
``` | ||
Or `body` CSS: | ||
```css | ||
body { | ||
direction: rtl; | ||
} | ||
``` | ||
2. Define a theme and set **direction** to **rtl**. | ||
@@ -54,16 +79,4 @@ | ||
*public/index.html* | ||
```html | ||
<body> | ||
<noscript> | ||
You need to enable JavaScript to run this app. | ||
</noscript> | ||
<div id="root" dir="rtl"></div> | ||
</body> | ||
``` | ||
## License | ||
This translation is licensed under the [BSD Licence](LICENSE), and sponsored by [Hamid FzM](https://hamidfzm.com). |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10733
1
77