Hi
I have created some animations to be inserter in epub3 book.
Now I need to translate the strings who appears in differente language.
Is quite tedious to change each of them on the time line.
There is a way to store the string some where and on the time line put only a link to that string?
Some thing like a lookup system.
So when is need to translate string , all are in the same place.
Thank you for any suggestion
Also I played with this last night. Which may help.
Each text box is Id'ed by an additional attribute . The attribute
It uses Custom Behaviours held in a persistent Symbol (off Viewport and so it can be used in all scenes( you don't need it on all scenes as iit is pursuant and will be global )
The Custom Behaviour name have the text box additional attribute name and which language object to use. The CB name look like: txt1_eng1
All CBs call the same Hype function which will split the txt1_eng1 name into the txt box ident and the lang object to use for it.
const lang = event.customBehaviorName.split('_')
const txtBox = lang[0]
const string = lang[1]
const textData = {
txt1: {
eng1:"Hello, how are you",
fre1:"Bonjour, comment ça va ?",
eng2 :"Goodbye, see you later!",
fre2 :"Au revoir, à bientôt !"
},
txt2: {
eng1:"I love to travel and explore new places.",
fre1:"J'adore voyager et explorer de nouveaux endroits.",
eng2 :"Can you help me find the nearest restaurant?",
fre2 :"Pouvez-vous m'aider à trouver le restaurant le plus proche ?"
}
}
const txt_ = document.querySelector(`[data-textid=${txtBox}]`)
txt_.innerHTML = textData[txtBox][string];