Skip to main content
julian_franklin1
Participant
January 21, 2016
Answered

displaying different languages

  • January 21, 2016
  • 1 reply
  • 616 views

Hi - my company is trying something new - Language Support!  We want to take a standard English presentation and place a slide at the beginning which invites the user to select their language (e.g. US, DE, FR, ES, etc).  I've experimented a bit and have got working proof of concept which allows people to be able to click on a flag which represents their country and display text of the appropriate language on each page thereafter, but the programming of variables is horrendous.  I've been taking advantage of the Advanced Actions and variables a person can create, but each of the text assets has to be named, and then specified to be shown or hidden.  So, for example, if the US flag is selected on slide 1 all text assets (US_text1, US_text2, US_text3 etc) have to be set to "Show", while all other assets should (as a matter of good practice) be set to "Hide", which means stipulating DE_text1, DE_text2, DE_text3 etc, FR_text1, FR_text2, FR_text3 etc, ES_text1, ES_text2, ES_text3 etc.  That's a lot of coding!  I've been looking into this new feature: Change State - but I think it only affects the slide it is being applied to, but if you know differently, please let me know!

I guess what I'm asking for is this: is there a way of using a 'wildcard' so that I can simply stipulate any asset tagged as US can be shown/hidden a bit like this:  When the US flag is clicked show US_text%%,hide DE_text%%, hide FR_text%%, hide ES_text%% (I'm using %% as an example of a wildcard (which I've tried - I've also tried * and $ signs).  Anything that would help speed up the coding for this simple task would be very much appreciated.

If you can solve it, I'll buy you a coffee!

    This topic has been closed for replies.
    Correct answer Widget King

    Check out this video for CpExtra (currently in Beta, should be released soon): Introduction to CpExtra - YouTube

    The part applicable to you should be at 6:15.

    Though it's not covered in the video, what's going on under the hood is there are two User Variables called xcmndHide and xcmndShow. If you assign FR_@ to xcmndShow, it will show all objects it can find with FR_ at the start of the name and then anything after that (so in your example FR_text1, FR_text2, FR_text3 would all be shown). xcmndHide can be used in the same way. So that's a single line of code to show / hide all those objects.

    Actually, there is another feature in CpExtra which is not covered in the video which will allow you to create the same functionality without having to use any Advanced Actions.

    This method uses states. CpExtra will pay special attention to any state with x_ at the start of its name. It's expecting everything after x_ to be instructions as to when that state should appear. One of those instructions can be that a variable must be of a specific value. So say you've got a User Variable in your course named CourseLanguage. It's either set to US, DE, FR, ES depending on the language. You can add a state to your captions called x_CourseLangage_US, that state will automatically appear when the CourseLanguage variable is set to US. x_CourseLanguage_DE will only appear when CourseLanguage is set to DE. x_CourseLanguage_FR and x_CourseLanguage_ES will follow the same pattern.

    Using that method, if for some reason the user decided to change the course language mid slide, all captions would automatically update to the correct version. This can also be used to customize images too. Anything that allows you to add states.

    The only down side is it's not out yet. But it should at most only be another few weeks before it is.

    Tristan,

    1 reply

    BDuckWorks
    Inspiring
    January 21, 2016

    You may get a recommendation with some programming intensive approaches for handling this. I tend to take a more file-centric approach: five separate files!

    The last to build, but first the user will see, is a menu slide. As you describe it, there are flags for each language and the user makes their selection. In an LMS environment, this step would likely be removed as the LMS should have a language preference setting for each user, and they would only see the version of the course available in their preferred languages.

    Your premise is that there are 4+ versions of the course available in multiple languages, is there really value past choosing one for the participant? I know, it takes the excitement out of choosing a language, but once it's done is it really that exciting?

    Unless an undocumented requirement is to be able to switch between languages on the fly, for each slide, without loosing their place...  having the menu is just eye-candy.

    If my approach is acceptable, you would build a Cp file in English (assuming it's the preferred first language), proof, review by a few subject matter experts (SMEs), revise and publish the course.

    Then, after duplicating the final Cp file for the 2nd language, export the captions for translation from the duplicated file. Have your linguist & SME for the 2nd language review and translate the export file in Word. Once their revisions are complete, you would import the translations back to Cp in the 2nd file. (These translations should never touch the 1st file, which is maintained as the English source file.) The 2nd file would be proofed, review by a few more subject matter experts (SMEs), revised and publish the course as the 2nd language.

    You would return to the English master, duplicate again for the 3rd language and repeat the process.

    Ideally, your changes from each revision would be isolated to that language, as changes back the the 1st edition while working on the 3rd edition brings the content of the 2nd edition into doubt. Each successive language edition adds a geometric level of complexity if you allow changes to effect the original content.

    Widget King
    Widget KingCorrect answer
    Inspiring
    January 22, 2016

    Check out this video for CpExtra (currently in Beta, should be released soon): Introduction to CpExtra - YouTube

    The part applicable to you should be at 6:15.

    Though it's not covered in the video, what's going on under the hood is there are two User Variables called xcmndHide and xcmndShow. If you assign FR_@ to xcmndShow, it will show all objects it can find with FR_ at the start of the name and then anything after that (so in your example FR_text1, FR_text2, FR_text3 would all be shown). xcmndHide can be used in the same way. So that's a single line of code to show / hide all those objects.

    Actually, there is another feature in CpExtra which is not covered in the video which will allow you to create the same functionality without having to use any Advanced Actions.

    This method uses states. CpExtra will pay special attention to any state with x_ at the start of its name. It's expecting everything after x_ to be instructions as to when that state should appear. One of those instructions can be that a variable must be of a specific value. So say you've got a User Variable in your course named CourseLanguage. It's either set to US, DE, FR, ES depending on the language. You can add a state to your captions called x_CourseLangage_US, that state will automatically appear when the CourseLanguage variable is set to US. x_CourseLanguage_DE will only appear when CourseLanguage is set to DE. x_CourseLanguage_FR and x_CourseLanguage_ES will follow the same pattern.

    Using that method, if for some reason the user decided to change the course language mid slide, all captions would automatically update to the correct version. This can also be used to customize images too. Anything that allows you to add states.

    The only down side is it's not out yet. But it should at most only be another few weeks before it is.

    Tristan,

    julian_franklin1
    Participant
    January 22, 2016

    Tristan, this is brilliant news!  I love your answer, and your video was really helpful, too.  I liked your analogy between using a screwdriver and a multi-tool.  Some constructive feedback from me though would be that it would have been useful to see *how* the widget was used to deploy the demonstrated features shown.  Don't get me wrong, the demonstrations were really good, but it wasn't clear to me what the Captivate screen would have looked like while you were trying to take advantage of the features you showed-off.  But I love the idea of this CpExtra widget you've designed and want to know what it will cost and when it will be ready for market.

    Thank you for all your hard work, and for your speedy response to this immediate problem.

    Hope to hear from you soon.