Forum Discussion

RussellThoma007's avatar
RussellThoma007
Community Member
8 months ago

Getting the slide the user will continue from if they re-visit the course and switching language

We're currently in the process of building a multi-lingual course. Each language has been developed as a standalone Storyline file but we need to combine them into a single file with a menu to select which language. Each language will be a separate story within the module. This is fine but the only issue is that the client needs to be able to switch languages throughout the course. For example, if the user starts the French story and gets to slide 10 and then re-visits the module at another time, the user needs to be able to switch language and continue from where they left off. Is there a way to get the slide number e.g. 10 of where the user got to in one story and then 'jump to slide' 10 in another language story?

  • Hi Russell, I don't think you have an easy solution for this one unfortunately. You will end up with several if statements, possible over 100 if you are supporting multiple languages and your course is large.

    What I would suggest is setting a storyline variable to track both the current scene and current slide.

    "sceneNumber" (type = Number)

    "slideNumber" (type = Number)

    In your Master Template, add the following trigger to update the variables

    When timeline starts on this slide
    - Set sceneNumber to variable Project.SceneNumber
    - Set slideNumber to variable Scene.SlideNumber

    Ok, that's one part of the problem solved. You now know the current scene and slide number, so when the user switches lannguage, you would then have to look at the sceneNumber and slideNumber variables, and send the user to the languages corresponding scene and slide.

    Lots of if statements! I don't really think it is viable and will be horrible to maintain. You'd probably be better off employing some JavaScript too.

    For example, scene 1 may correspond to scene 10 for "esp" scene 20 for "jp" and then the same with slide numbers.

    You will also have the issue that when users switch languages, and interaction completed in "esp" will not be completed in the "en" stream. 

    Is there a compelling reason to allow users to switch languages? One that justifies the work ahead of you :)?

    • RussellThoma007's avatar
      RussellThoma007
      Community Member

      Thanks Sam, that was the conclusion I had reached too. It's complex but manageable as there are only 20 slides per story and 3 languages (stories). The only issue I have is when people re-visit the module, the logic I need to apply is:

      User revisits module (slide 5 of scene 2) -> user is re-directed to language selection -> user is then re-directed to the corresponding language slide if a different language is selected (slide 5 of scene 3)

      The re-direct logic is fine but I can't find a way to find out if the user has re-visited the module or a way to fire some logic only once so there is no re-direct loop on every slide. I guess a Javascript session or using the system date would be possible but is there a better way? Variables persist when re-visiting so I can't see a way to achieve this with variables alone.

      Thanks