Open AlexAndBear opened 2 months ago
Thanks for your suggestion Alex, it would be nice indeed to support internationalization!
I think the translations should be separate from the editor so the bundle doesn't include every translation, so I think the best API is to be something as follows.
<script>
import { JSONEditor, languageDeDe } from 'svelte-jsoneditor'
// here, languageDeDe can be something like:
// {
// id: 'de-De',
// texts: { searchFindText: 'Finden' }
// }
</script>
<JSONEditor language={languageDeDe} ... />
We can discuss in detail about the best API and namings for this. At least it should work with tree-shaking.
Help with this would be welcome! Any work should be done based on the v1
branch to prevent merge conflicts.
What version is expected to support multilingual support?
There is no concrete planning for i18n support right now. This feature awaits help from an open source contributor.
Currently the svelte-jsoneditor is missing options for internationalization.
I am thinking of two ways, how this can be archived:
translation: 'de-De'
{ texts: {searchFindText: 'Finden'}}