0.9.5 • Published 7 years ago
@dlghq/react-l10n v0.9.5
React localization
Localization for React components
Installation
npm install --save react
npm install --save @dlghq/react-l10nUsage
import React from 'react';
import { render } from 'react-dom';
import { Provider, Text } from '@dlghq/react-l10n';
const messages = {
'en-US': { hello: 'Hello' },
'ru-RU': { hello: 'Привет' },
};
function Application() {
return (
<Provider messages={messages} locale={navigator.language}>
<Text id="hello" className="text" tagName="p" />
</Provider>
);
}
const container = document.getElementById('container');
render(<Application />, container);License
0.9.5
7 years ago
0.9.4
7 years ago
0.9.3
7 years ago
0.9.3-0
7 years ago
0.9.2
8 years ago
0.9.1
8 years ago
0.9.0
8 years ago
0.8.0
8 years ago
0.7.4
9 years ago
0.7.3
9 years ago
0.7.2
9 years ago
0.7.1
9 years ago
0.7.0
9 years ago
0.6.0
9 years ago
0.5.1
10 years ago
0.5.0
10 years ago
0.4.0
10 years ago
0.3.1
10 years ago
0.3.0
10 years ago
0.2.0
10 years ago
0.1.2
10 years ago
0.1.1
10 years ago
0.1.0
10 years ago