The Framework can be internationalized by providing translation dictionaries for plugins, core and then specifying what language in region.json. This PR ports that ability from the C# site to the static site -- this amounts really to compiling the translation dicts across the various folders using python. We are able to use the already implemented i18next library to template in the values-- it automagically just works behind the scenes. TNC developers won't have to make any updates for translations to work.
Some instances of English ("Zoom to Extent") are also because there is no provided translation.
Testing Instructions
Serve the static site.
** Ensure there are no (javascript) errors in the console for the map and text to load. If you have any custom plugins downloaded for testing that are erroring, you may want to just delete them.
The site should be in english
Change the language in region.json to Spanish es instead of English (en).
Overview
The Framework can be internationalized by providing translation dictionaries for plugins, core and then specifying what language in
region.json
. This PR ports that ability from the C# site to the static site -- this amounts really to compiling the translation dicts across the various folders using python. We are able to use the already implementedi18next
library to template in the values-- it automagically just works behind the scenes. TNC developers won't have to make any updates for translations to work.Connects #1088
Demo
Using spanish.
Notes
There are some known translation fails that were fixed in https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/1109 and https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/1112 . These fixes are on develop.
Some instances of English ("Zoom to Extent") are also because there is no provided translation.
Testing Instructions
Serve the static site.
** Ensure there are no (javascript) errors in the console for the map and text to load. If you have any custom plugins downloaded for testing that are erroring, you may want to just delete them.
The site should be in english
Change the language in
region.json
to Spanishes
instead of English (en
).Refresh the web page
See that translations (as far as they exist).