This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "movie": { | |
| "title": ["Jurassic Park", "Le Parc jurassique"] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Movies = props => ( | |
| <Translate> | |
| {({ translate }) => <h1>{translate("movie.title")}</h1>} | |
| </Translate> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Translate } from 'react-localize-redux'; | |
| const Profile = props => ( | |
| <Translate id="profile" data={{ name: 'Ted', date: new Date() }}> | |
| {'User: ${name} last login ${date}'} | |
| </Translate> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Movies = props => ( | |
| <h1> | |
| <Translate id="movie.title" /> | |
| </h1> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { Translate } from "react-localize-redux"; | |
| const Movies = props => ( | |
| <h1> | |
| <Translate id="movie.title">Jurassic Park</Translate> | |
| </h1> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { withLocalize } from "react-localize-redux"; | |
| import movieTranslations from "./translations/movies.json"; | |
| class Movies extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.props.addTranslation(movieTranslations); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "movie": { | |
| "title": ["Jurassic Park"], | |
| "desc": ["Lots of dinos!"], | |
| "stars": ["${ stars } out of 5"] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title": ["Movie Reviews"], | |
| "search": ["<a href='http://www.imdb.com/'>Search IMDb</a>"], | |
| "copyright": ["copyright ${ year }"] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import frenchMovieTranslations from "./translations/fr.movies.json"; | |
| this.props.addTranslationForLanguage(frenchMovieTranslations, "fr"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { renderToStaticMarkup } from "react-dom/server"; | |
| import { withLocalize } from "react-localize-redux"; | |
| import globalTranslations from "./translations/global.json"; | |
| class Main extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.props.initialize({ |