ComboBox Localisation

Hello!
Currently, I’m trying to localize my project, and the Localisation Dash Panel is very handy.
But it won’t work with the options of the ComboBox.
So, if I want to localize my ComboBox, what should I do?
Thank!

Store the desired options as a text array and populate the combobox from those texts at runtime. The text array is then able to be gathered and translated.

What if someone changes the language at runtime? Almost all Text widgets in the game update automatically, but if a ComboBox is built off text converted into strings at create-time, it won’t be updated, and you’d have to refresh any comboboxes in the game manually to get the update text.

Why not use localized text for this widget in the first place, like almost all the other UI widgets?

Warming this thread up again, are there any plans to make the combo box properly localizable with support for runtime switching? I see that Fortnite is currently handling this with a popup saying that not everything can be switched at runtime and a restart is recommend, would be curious to know if there are plans to fix it. Thanks!

Still needing this. New company, new project now… same issue :wink:

I did it that way. Created a function that removes existing options and adds them again depending on the language. I just called the function when the language changed. This is probably the only solution

3 Likes

If anyone else goes through this. Here’s my solution. Just like the user above said. First clear the combobox and re add the options. I’m using this in the Event Construct and every time the language is changed.

I know this is an old thread, but in case anyone is still looking for a solution, this might be helpful.

The mentioned approach of clearing and re-adding ComboBox options every time the language changes works but has some downsides. It requires extra processing, can be inefficient for large ComboBoxes, and disrupts the automatic localization system that normally updates UI text dynamically. Additionally, retrieving translations manually—whether through hardcoding or other means—can feel inconvenient and add unnecessary complexity.

A different approach can avoid these issues while ensuring that translations update automatically without needing to refresh options manually.

  1. Pre-spawn your ComboItem widgets
    Before constructing the ComboBox, create all necessary ComboItem widgets, each associated with a unique text key. This ensures that each option has a corresponding widget ready for display.

  2. Add ComboBox options with identifiers
    Since FText stores a unique identifier for each localized text, add them as options (e.g., “2503BD4742C4”) instead of raw text (e.g., “Start” or “Settings”). Call Add Option for each item, passing this identifier to the ComboBox Strings, ensuring each option is associated with the correct localized text dynamically.

  3. Retrieve the appropriate widget in OnGenerateWidgetEvent
    When the ComboBox triggers OnGenerateWidgetEvent, search for the corresponding ComboItem widget by comparing the key in the given string with each pre-spawned widget. This ensures that the correct localized text is displayed without additional processing.

You can see an example of this approach in the following code
OnAddSetting and OnConstructComboItem – link

  • OnAddSetting
    Called during the ComboBox construction. It initializes the ComboBox options using FText identifiers instead of raw text, ensuring that localization is applied dynamically.

  • OnConstructComboItem
    Function bound to the ComboBox’s OnGenerateWidgetEvent. This function is responsible for retrieving the pre-spawned ComboItem widget corresponding to the selected identifier, ensuring the correct localized text is displayed.

As a result, the existing ComboBox can properly display and switch cultures just like any other widget.

All the same will work great in blueprints as wel, where OnGenerateWidgetEvent can be bound in the details panel of the Combobox widget, similar to other widget events