Forum rules - please read before posting.

Gather text for addressable scenes

Hi how do I gather text for addressable scenes? All my scenes are addressables. And how do I add flags and show the complete list or a separate panel in the options menu when the player clicks on language button? I'm using Unity UI. Please let me know any tips on implementing this properly.

Comments

  • You will need to temporarily add your scenes to the Build Settings to have them be included in the "Gather text" operation.

    For your languages UI, you can replace AC's provided "Language" cycle element with your own set of UI Button objects. Next to each, you can add Image objects to represent each language's flag - these don't need to be linked to the Menu in the Menu Manager.

    For each Button, have them run an ActionList that uses the Save: Set Option Action to change the language.

  • So will I need to keep the scenes in the building settings even when uploading the CSV file? Or whenever I update the new language?

  • edited May 2023

    Hi Chris, I've translated all the text to Spanish. But when I play the game in the editor some of the interaction look dialogs and use dialogs are still playing in English. The menu buttons don't update sometimes. And weariedly one of the look interaction is playing a speech audio of the robot from the demo project before displaying the dialog I was using.

    I checked the dialogs in the Speech manager and some of the Spanish text is missing, blank. I checked my CSV file in and it has the Spanish lines. I'm using Google Sheets.

    Some of the timeline speech seems to be not translated.

    I'm getting this in the console for most dialogs "Cannot find translation for*"
    And this multiple times "Audio file 'Resources/Speech/Player1273' not found in Resources folder."
    I'm not using Audio for speech in my game. But the robot dialogs audio is playing for some.

    Even the interaction button texts are displayed in English

  • So will I need to keep the scenes in the building settings even when uploading the CSV file? Or whenever I update the new language?

    No. So long as you don't overwrite the original language's text - only translations - the scenes only need to be in the Build Settings during the "Gather text" operation.

    And weariedly one of the look interaction is playing a speech audio of the robot from the demo project before displaying the dialog I was using.

    The naming convention of expected audio for your Player character matches that of the Demo game. If you want no audio speech, you can uncheck Auto-play speech audio files? in the Speech Manager.

    It's also safe to remove the /Assets/AdventureCreator/Demo/Resources/Speech folder, which contains the Demo Player's audio, to reduce the filesize of your game.

    I checked the dialogs in the Speech manager and some of the Spanish text is missing, blank. I checked my CSV file in and it has the Spanish lines. I'm using Google Sheets.

    Do the lines with missing text match up with those in-game that aren't being translated? If you enter some text manually in the Speech Manager, do they should correctly at runtime?

    Check the Console upon importing the CSV - it should tell you if it has trouble with the import.

    If some lines are being imported, but not others, it may be a formatting issue. Open up the CSV file in a raw text editor and compare lines that import and those that don't - is there an obvious pattern? You're welcome to copy/paste some samples here.

  • edited May 2023

    Okay, I found that the interaction dialogs are not getting exported. I'm using an
    Actionlist Run action to run an Actionlist Asset file and pass the dialog as a string parameter into the Actionlist Asset. Please take a look at the screenshots.

    https://imgur.com/a/P04V9vU

    https://imgur.com/a/IcAJt42

    This could be the reason or not but the interaction dialogs are not present in the exported CSV file.

  • It's because you're using a parameter to set the dialogue text. This text is detached from the Action, so AC cannot recognise it as speech text as part of the Gather Text process.

    You need to create a dedicated speech Action - with the text set within it - for it to be translatable. If you place this in a separate ActionList asset file, you can set your "Dialog" String parameter to the type "Unity Object", which references this asset, and then use that to override an ActionList: Run Action where your Dialogue: Play speech Actio currently is.

  • Thanks I'll figure it out.

  • Is it possible to gather text in part? Like scenes 1 and 2 today and import them. Then scenes 3 and 4 gather later and then import? Will the old IDs get replaced? Will the ID numbers of the text not have any issues like identical IDs?

  • When gathering text, you should keep all scenes included in the process - you could start with just gathering scenes 1 and 2, but when it comes to 3 and 4, you should include 1 and 2 as well, since they've already been gathered.

    Otherwise, AC will assume that the text in scenes 1 and 2 are not longer included.

    This needn't necessarily be an issue - what happens in this case is set by the ID number recycling option. By default, this is set to Never Recycle - so if a gathered line is missing, its ID won't be used elsewhere.

    Be sure to keep a back up of your project beforehand when gathering text. You should be fine - but a backup will help you out just in case.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.