Multi language animation

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

There are examples on the forum of doing this already.
But please post a small example of your setup and I or someone will try and help

That works with a Hype project? There was iBooks Author, but that was mainly an iPad thing… and was discontinued years ago.

Maybe this template will help…

https://photics.com/free-template-tuesday-11-tumult-hype-multilingual/

…and here's a video…

https://www.youtube.com/watch?v=bfNxviLRN5w&list=PLORkPhKfIRglpDfk0PcLCnC4a1SiRDbaX

3 Likes

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.

The CBs are called on a time line as needed.

lang_CBH.hype.zip (18.8 KB)


The code:

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];
3 Likes

Thank you both, the two solutions are very interesting as they may not depend on the browser as it is in an epub book.

:clap:

1 Like