Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Story localization

edited July 2016 in Workshop
Hello. I am currently working on the new feature for Twine - story localization.
To cut the story short - link to my fork with work in progress

The basic idea is for story to have list of languages and have text for all those languages.
  • Each passage will have one text for each language. Which can be easily accessed.
  • Add and remove story languages.
  • Set default story language.
  • Import current twine format.
What will user see
  • Localization settings view. Here you can add and remove story languages and set default language.
  • Story localization option in the story toolbar (bottom left corner in story view next to home icon) which will open localization settings view
  • Tabs with all languages on the bottom of the passage editor.
  • In the end it would be enough to only append lang code to url to see localized version:
Technical steps
  • Change story data model to store list of all languages and default language.
  • Change passage data model to store multiple texts - object like {en: text1, ua: text2}. Change all views to be able to work with multiple texts.
  • Create view for editing localization settings: list of languages and default language.
  • Implement tab-like language switch in passage editor.
  • Implement import and export
  • Implement old format import
  • Add support to harlowe and snowman

Feedback, suggestions, issues and help are appreciated and are the main purpose of this publication.


  • Not everyone hosts their generated Story HTML files online, many allow people to download and view the story locally so your solution needs to take this into consideration.

    Instead of "Add support to harlowe and snowman" and embedding all passages within the generated Story HTML file, would it not make more sense to extend the existing Publish to File option to support making language specific files.

    1. Select Publish to File option.
    2. Select which set of passages based on Language you want to embed within the chosen story format.
    3. Generate a Language specific version of the Story HTML file.
  • Thank you, @greyelf
    For offline playing it is up to plugin how to show the language option. I'll se what it's gonna be when working on those.

    Publish to file a specific language is also an option I've been thinking of, probably I'll include it. Also I've considered flow when the user generates old-styled format that can be converted to page by existing version of plugins.
    Actually I need to think more about 'user stories' and scenarios of this whole feature.
  • Status update
    Most of the internal functionality is done i.e.:
    • Each passage will have one text for each language. Which can be easily accessed.
    • Add and remove story languages.
    • Set default story language.
    • Import current twine format.
    • Localization settings view and story localization option
    • Tabs with all languages
    • Import and export
    • Old format import

    What is left to do:
    • Switching the localization in the game mode
    • Support to Harlowe and Snowman
    • Export old format (single language export)
    • Write tests
    • Check integrity with all Twine functionality
    • Check if there are no bugs

    And I would really appreciate someone's help with few items: writing tests, code review and checking the functionality.

    Help with all other things is still appreciated and very welcome.
  • I've deployed an updated version of twine with story localization to my server. You can play around with it on
    Issues report here
Sign In or Register to comment.