mirror of
https://github.com/mue/mue.git
synced 2026-07-21 07:54:13 +02:00
refactor: language cleanup and css fix
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
@@ -10,6 +10,13 @@ import 'react-toastify/dist/ReactToastify.css';
|
||||
import '@fontsource/lexend-deca/latin-400.css';
|
||||
import '@fontsource/roboto/cyrillic-400.css';
|
||||
|
||||
// language
|
||||
import merge from './modules/helpers/merge';
|
||||
const languagecode = localStorage.getItem('language') || 'en-GB';
|
||||
// we set things to window. so they're global and we avoid passing the translation strings as props to each component
|
||||
window.languagecode = languagecode;
|
||||
window.language = merge(require('./translations/en-GB.json'), require(`./translations/${languagecode}.json`));
|
||||
|
||||
ReactDOM.render(
|
||||
<App/>,
|
||||
document.getElementById('root')
|
||||
|
||||
Reference in New Issue
Block a user