Files
coopgo/node_modules/react-polyglot/example/app.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

18 lines
413 B
JavaScript

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')
);