Unity Localization : How Do I Localize Audio From Script ?

Hi.
I want to localize my audio (dialogue voices) and I tried to do so with the localized asset table.
8333277--1095243--upload_2022-8-3_9-6-55.png
My idea was simple, something like LocalizedAssetTable.GetEntry(key) and then somehow cast it into an AudioClip and then do whatever I need with that.
Well I don’t know how to do just that, and have been stuck with this for days, can’t get it to work. Any clue on how to solve this situation would be amazing.
Thanks.

You could use a LocalizedAudioClipEvent.

Right click the Audio source component and choose Localize. It will set it up for you.

Alternatively you can use this in script.
https://docs.unity3d.com/Packages/com.unity.localization@1.3/api/UnityEngine.Localization.LocalizedAudioClip.html

See LocalizedAsset Scripting | Localization | 1.3.2

Or call directly LocalizationSettings.AssetDatabase.GetLocalizedAsset(…

Ooh this is exactly what I wanted, thank you so much!