Open francamps opened 6 years ago
As it is, the application does not currently support RTL languages. Check #6.
@francamps Could you help me understand what is wrong with the code that has been commented out? The toggle seems to be working for me after I uncomment the relevant code in Toolbar.jsx
@jlieb10 It's possible that it works well but some aspects of it are a little bespoke and we decided to hide the feature until we have time to develop a more standard solution which could include more languages and also RTL.
@1cgonza this might be helpful if you are looking to make a PR with your Spanish localizations :)
Map2d currently has some localization features.
src/js/copy.json
is thought of as a localization device that contains all translations. It contains the interface copy text as well as dictionaries for recurrent words in the data served by the server. Components default to English (en-US
), but can allow toggling between different languages.Additionally,
src/js/es-MX.json
is an additional file that contains sets of property labels localized in a particular language (in this case,es-MX
, Mexican Spanish). Note that this file is named exactly like the language codes available incopy.json
.Toolbar.jsx
should contain a button that switches between the available languages in the Redux store, which align coincide with the languages available incopy.json
. Note that in the Redux store (src/store/initial.js
) you'll find the language code inapp.language
, which defaults toen-US
.