Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ra-language-farsi

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ra-language-farsi - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

2

package.json
{
"name": "ra-language-farsi",
"version": "1.0.0",
"version": "1.1.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",

@@ -37,7 +37,8 @@ # Farsi Translations for React-Admin

## RTL
Material UI is already supprting RTL, so we can add its support to react admin using these 2 steps:
Material UI is already supprting RTL, so we can add its support to React Admin using these 2 steps:
1. Change **dir** property to **rtl** in your root elements (like body). You can also connect this property to redux.
*public/index.html*
1. Change `dir` property to `rtl` in your root elements (like body).
Using HTML (*public/index.html*):
```html

@@ -52,3 +53,3 @@ <body>

Or `body` CSS:
Using CSS style:
```css

@@ -60,7 +61,18 @@ body {

2. Define a theme and set **direction** to **rtl**.
Or Pure JS:
```js
document.getElementsByTagName("body")[0].setAttribute('dir', 'rtl');
```
2. Define a theme and set `direction` to `rtl`. Also defining an RTL theme might be not enough to flip all React Admin components. So we use [**jss-rtl**](https://github.com/alitaheri/jss-rtl) plugin to make sure everything works properly.
```javascript
import { createMuiTheme } from '@material-ui/core/styles';
import {create} from 'jss';
import rtl from 'jss-rtl';
import {StylesProvider, jssPreset} from '@material-ui/core/styles';
// Configure JSS
const jss = create({plugins: [...jssPreset().plugins, rtl()]});
const theme = createMuiTheme({

@@ -71,10 +83,13 @@ direction: 'rtl',

const App = () => (
<Admin theme={theme}>
// ...
</Admin>
<StylesProvider jss={jss}>
<Admin theme={theme}>
// ...
</Admin>
</StylesProvider>
);
```
## License
This translation is licensed under the [BSD Licence](LICENSE), and sponsored by [Hamid FzM](https://hamidfzm.com).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc