Change default locale to es
This commit is contained in:
parent
8b863770ab
commit
9ab379cd7e
1 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import { BrowserRouter } from 'react-router-dom';
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
import { IntlProvider } from "react-intl";
|
import { addLocaleData, IntlProvider } from "react-intl";
|
||||||
|
import es from 'react-intl/locale-data/es';
|
||||||
|
|
||||||
// Main app component
|
// Main app component
|
||||||
import App from "./components/App";
|
import App from "./components/App";
|
||||||
|
@ -16,12 +17,14 @@ import "./index.css";
|
||||||
import messages_en from "./translations/en.json";
|
import messages_en from "./translations/en.json";
|
||||||
import messages_es from "./translations/es.json";
|
import messages_es from "./translations/es.json";
|
||||||
|
|
||||||
|
addLocaleData([...es]);
|
||||||
|
|
||||||
const messages = {
|
const messages = {
|
||||||
'en': messages_en,
|
'en': messages_en,
|
||||||
'es': messages_es
|
'es': messages_es
|
||||||
};
|
};
|
||||||
|
|
||||||
const language = 'en';
|
const language = 'es';
|
||||||
|
|
||||||
// Add IntlProvider to make the internationalization functions visible in all
|
// Add IntlProvider to make the internationalization functions visible in all
|
||||||
// our components.
|
// our components.
|
||||||
|
|
Loading…
Reference in a new issue