There are many ways to go about implementing this feature, the proposal can change through continued discussion, but for now I propose a locale dropdown selection in the Header. This can be added beside the Test button as such:
Below is a sample dropdown UI concept where the user can open the dropdown, click on the "+" button to add a new locale. Each locale selection has an ✏️ edit button to rename it, and a 🗑️ delete button. There could be a ⭐ toggle button to set a locale as an application default, so all new .json files will start with this locale for convenience sake.
Upon selection of a locale, all SentenceNodes, ChoiceNodes and OptionNodes that have actual dialogue lines should automatically switch to the new locale. If the locale was newly created, then those nodes will have empty sentences, ready to accept a new sentence in the new language. Values that are not dialogue lines such as EndPathNode or BridgeNode should NOT be affected.
Extra Notes
There should be a hotkey to quickly switch between locales for quick comparison.
The entire Monologue UI can piggyback on this dropdown to change the application language. So not only the dialogue language will change, but the Monologue application language changes too.
Is this a feature for a project you're working on?
Supporting multiple languages is a common and important use case in VNs to reach a wider audience.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Changes to JSON Structure
Following Monologue's design philosophy, I don't think we should introduce .csv files for dialogue localization. Instead, it should be built into the existing JSON. The current idea is proposed to look like this:
To support this change, the MonologueLine field needs to be able to deal with the locale dictionary to display/save the sentences of each language correctly. MonologueProcess will just need to have one extra step to get the correct locale before displaying the sentence.
Consideration for .csv Translations
I foresee that users may still want to do translations in a .csv file or at least in a table format, where each column represents a locale. Personally, I don't want Monologue to have a .csv file for each .json file; especially when EndPathNode is very strong and we can chain lots of stories. Having each .json spawn an extra .csv is going to be a lot. Creating a UI in Monologue just to support translation tables seems overkill since we don't use .csv. If we want to support any user's existing workflow for .csv, maybe we can have an Import button that will grab the data from a .csv and distribute it into our .json structure, where the ID/key is the node ID, and the locale data will be put into the locale dictionary?
I really like this proposal, the only problem I see at the moment is that it's complicated to have an overview of the translations, to know if any are missing or to compare them easily with other sentences.
Describe the feature / enhancement.
There are many ways to go about implementing this feature, the proposal can change through continued discussion, but for now I propose a locale dropdown selection in the Header. This can be added beside the
Test
button as such:Below is a sample dropdown UI concept where the user can open the dropdown, click on the "+" button to add a new locale. Each locale selection has an ✏️ edit button to rename it, and a 🗑️ delete button. There could be a ⭐ toggle button to set a locale as an application default, so all new .json files will start with this locale for convenience sake.
Upon selection of a locale, all SentenceNodes, ChoiceNodes and OptionNodes that have actual dialogue lines should automatically switch to the new locale. If the locale was newly created, then those nodes will have empty sentences, ready to accept a new sentence in the new language. Values that are not dialogue lines such as EndPathNode or BridgeNode should NOT be affected.
Extra Notes
Is this a feature for a project you're working on?
Supporting multiple languages is a common and important use case in VNs to reach a wider audience.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Changes to JSON Structure
Following Monologue's design philosophy, I don't think we should introduce .csv files for dialogue localization. Instead, it should be built into the existing JSON. The current idea is proposed to look like this:
Before
After
To support this change, the MonologueLine field needs to be able to deal with the locale dictionary to display/save the sentences of each language correctly. MonologueProcess will just need to have one extra step to get the correct locale before displaying the sentence.
Consideration for .csv Translations
I foresee that users may still want to do translations in a .csv file or at least in a table format, where each column represents a locale. Personally, I don't want Monologue to have a .csv file for each .json file; especially when EndPathNode is very strong and we can chain lots of stories. Having each .json spawn an extra .csv is going to be a lot. Creating a UI in Monologue just to support translation tables seems overkill since we don't use .csv. If we want to support any user's existing workflow for .csv, maybe we can have an Import button that will grab the data from a .csv and distribute it into our .json structure, where the ID/key is the node ID, and the locale data will be put into the locale dictionary?