Dynamic Localization Problem

I’ve got static localization down, but I’m having trouble with dynamic localization.

I have a "Victory" scene in which I need to indicate which player has won. I have a PlayerPrefs setting that contains the number of the player. My String table contains entries like

Key,en,fil,...
playerwins,"Player {0} Wins", "Nanalo ang Manlalarov {0}",etc.

I have attached my VictoryController.cs script to a text object that is set up with the dynamic key

public class VictoryController : MonoBehaviour
{
    public AudioSource applause1;
    public AudioSource applause2;
    public AudioSource applause3;
    private bool soundOn = true;
    private List<AudioSource> applauseSounds;
    
    public LocalizedString localStringVictor;
    public TMP_Text textComp;
    private string victor;
    public void Awake()
    {
        victor = PlayerPrefs.GetString("Victor");
        localStringVictor.Arguments[0] = victor;
        localStringVictor.RefreshString();
...

I have set the public variable localStringVictor to the correct entry in my string table. I set the textComp variable to the TMP_TXT in the string object.

I get a null reference exception the first time I reference the localStringVictor variable in my script.

What am I doing wrong?

What does the full error message say?
Try updating to the latest version of the localization package 1.4.4.
If its not visible in the package manager you can edit the manifest.json file in the packages folder.
What you are doing should work. You can also try using a smart string Smart Strings | Localization | 1.4.4

One thing could be that localStringVictor.Arguments is null. You need to assign the arguments array to it, it will be null by default. That may be the null ref error you are getting.
e.g

localStringVictor.Arguments = new object[]{ victor };

The last bit was the problem. I was creating the Arguments array in the OnEnable() method, which I now see is called after Awake().

Thanks!