Forum Discussion

jinhuiqu's avatar
jinhuiqu
Community Member
5 months ago

how could I replace the content of ALT from English to Mandarin?

how could I replace the content of ALT from English to Mandarin? I tried several ways, but failed. Even translate to Word, but I cannot import into it successfully. It said too much words 

1 Reply

  • There is no easy way to do this. This will get you started in the general direction, but it is very prone to human error:

    1. Save a copy of your .story project file in an empty folder
    2. Don't use the original file!
    3. Rename your file, changing the .story to .zip
    4. UnZip the file
    5. Look in the \story\slides folder
    6. Each slide is represented by file named slide[#].xml 
    7. Open one of the files in a text editor
    8. Don't use something like Word because it will add a bunch of hidden formatting text to the file structure
    9. I like Notepad ++ (free) as a text editor
    10. The file will have very long lines of text
    11. Use the search feature in you text editor
    12. Search for <alt>

    Each match you find will be the alternate text entry for that HTML element. You could also use a more robust search approach, like regular expressions or wildcards if the functionality is available in your editor.

    From here, you can manully replace the entries or devise some other means to process the data. For example, you could write a script that locates each entry in these .xml files and replaces it from a list of values, or prompts you directly for a new value.

    Be very careful that you do not change any other text in the file. If you do, it will almost certainly break (which is why you never use the original file).

    When finished, save the updated .xml file. Once all of the slides are updated, reZip all of the files and folders that you unZipped from the original project file. Rename the Zipped file, changing .zip to .story.

    Test out the new file. Open it, publish it, and verify that everything is working.