This commit is contained in:
17
node_modules/react-polyglot/example/app.js
generated
vendored
Normal file
17
node_modules/react-polyglot/example/app.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { I18n } from '../lib';
|
||||
import Greeter from './greeter';
|
||||
|
||||
const locale = window.locale || 'en';
|
||||
const messages = {
|
||||
"hello_name": "Hello, %{name}.",
|
||||
"num_cars": "%{smart_count} car |||| %{smart_count} cars",
|
||||
}
|
||||
|
||||
render(
|
||||
<I18n locale={locale} messages={messages}>
|
||||
<Greeter name="Batsy" />
|
||||
</I18n>,
|
||||
document.getElementById('app')
|
||||
);
|
||||
Reference in New Issue
Block a user