Hi Chris,
I’m currently translating my game and have encountered a few issues that I’m hoping you can help me resolve:
1) I have several scenes where I’ve used "Quotes Text" in my game, each displaying text through a Canvas with TextMeshPro. However, when I gather the text using the "Speech - Game Text" tool, these scenes don’t appear in the exported sheet. How can I ensure they’re included in the exported sheet?
P.S. All of them are included in the Build Profile.
https://prnt.sc/dF6vkR5LTxv4
https://prnt.sc/PwZhDgYdvAxL
2) I’ve excluded hotspots from being gathered, but they still appear in the sheet. How can I completely remove them from the export process?
https://prnt.sc/c8OsCohmJ_lW
3) My inventory items are displaying both the “Name” and “Display Name,” which are identical. Is it safe to use “Speech - Game Text - Always Merge” to prevent duplication? Additionally, will the “Always Merge” option remove the duplicates from the game as well?
https://prnt.sc/Nhu28TLleGQe
Thank you
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
1) Text from a Canvas will only be picked up automatically if it's linked to an AC Menu.
To pull non-AC text into the Speech Manager, you'll need a custom script that implements ITranslatable. The Manual's "Custom translatables" chapter covers this in more detail, but a sample script that works with TextMeshPro is below.
2) If the Hotspot text was gathered up before you opted to exclude it, you'll need to re-run the "Gather text" process to remove it.
3) What's your AC version? An Item's Label (if not name) field ought to override its Display field - it shouldn't be gathering both. Can you share images of how they each appear in the Speech and Inventory Managers?
When merging, it's important to note that the text's type (i.e. Hotspot, Menu Element) etc is not factored in - outside the case of Speech.
Thank you for sharing the script, Chris. Everything is working well now. The other double-inventory name issue hasn’t appeared again after gathering the text, so all good for now. Thanks again for your support!
Hi Chris, I have a question. When I translate the game to RTL languages like Arabic, will these custom Canvas scenes use RTL, or will they remain LTR?
The properties of the Canvas / Text box will remain unchanged - only the text will be replaced by the translation.
Thank you, Chris!
I have another question. If I translate my game into languages such as Chinese, German and Arabic, will the fonts work out of the box, or will I need to import them?
You'll need to supply Fonts that are capable of displaying the characters in your game's text - their display can't be automatic.
However, if your Menus use Unity UI throughout, you can use the following script from the AC Wiki to dynamically swap out your Fonts based on the current language:
https://adventure-creator.fandom.com/wiki/Per-language_Menus
Thank you, Chris. This script is very helpful. The script Wiki page mentioned that I need to attach it to the root of my Unity UI menu prefab. Does that mean I should attach it to every menu prefab in my game like subtitle, Pause, options etc?
Regarding the Language Index, is it just a number? For example, Japanese is 1 and Spanish - Spain is 2, etc. Is that correct?
https://prnt.sc/0eDULsPxfQhN
That's it!
Hi Chris, I'm experiencing an issue where the Canvas scenes are not displaying translations—they always show English text. I've attached the font script and assigned the appropriate font, but it still only displays English. Any idea why this might be happening?
https://prnt.sc/a8ZTm0hxU8i5
https://prnt.sc/NLOCtgWWaima
The Dynamic Font Language script won't affect what text is displayed - only what font is used to display it.
I've updated the CustomTMProText script above to include replacement of text at runtime.
Thank you, Chris. The script giving me these red error:
https://prnt.sc/llojhJ1_d3UK
Any idea how to fix it?
Update the script you created for the first instance of the code - the errors suggest you've copy/pasted it into a second file named Translation_forced