No Locale could be selected error

When starting the game - getting this error.
Tried solution from this comment , but didn’t helped.

No Locale could be selected:
The following (22) Locales were considered:
    English (en)
    Russian (ru)
    Czech (cs)
    Belarusian (be)
    Chinese (Simplified) (zh-CN)
    Dutch (nl)
    Finnish (fi)
    French (fr)
    German (de)
    Indonesian (id)
    Italian (it)
    Japanese (ja)
    Korean (ko)
    Polish (pl)
    Portuguese (Brazil) (pt-BR)
    Portuguese (Portugal) (pt-PT)
    Portuguese (pt)
    Spanish (Spain) (es-ES)
    Spanish (es)
    Turkish (tr)
    Ukrainian (uk)
    Vietnamese (vi)
The following (0) IStartupLocaleSelectors were used:

UnityEngine.Localization.Components.LocalizeStringEvent:OnEnable () (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Component Localizers/LocalizeStringEvent.cs:101)

The clue is in the error message at the end

The following (0) IStartupLocaleSelectors were used:

You dont have any startup selectors so it doesnt know what language to pick. Did you delete them all?
There should be at least 1 in the Localization Settings.
https://docs.unity3d.com/Packages/com.unity.localization@1.4/manual/LocalizationSettings.html#locale-selector

Thank you very much! You can’t beliebe how much you saved us!

Extra question:
I’ve seen your other answer and need little help. In this comment you explain how to insert float into local variable. But how do we insert localized string into localize string event from code?

You would do the same as the example but use LocalizedString instead of FloatVariable.
There are also some examples in the scripting docs
https://docs.unity3d.com/Packages/com.unity.localization@1.4/api/UnityEngine.Localization.LocalizedString.html

Can you please send exact place in the documentation or code example?
We still can’t figure it out… :frowning:

https://docs.unity3d.com/Packages/com.unity.localization@1.4/api/UnityEngine.Localization.LocalizedString.html#constructors

public LocalizedString withNestedTranslation = new LocalizedString("My String Table", "My Game Text")
{
   { "some-text", new StringVariable { Value = "Hello World" } },
   { "nested", new LocalizedString("My String Table", "My Nested Text")
     {
         { "score", new IntVariable { Value = 100 } },
     }}
};

https://docs.unity3d.com/Packages/com.unity.localization@1.4/api/UnityEngine.Localization.LocalizedString.html#UnityEngine_Localization_LocalizedString_Remove_System_String_

const string variableName = "my-variable";
localizedString.Add(variableName, new LocalizedString());

For what reason can an error be caused when setting a value to the localizer?
When calling the localizer again - everything works

FormattingException: Error parsing format string: Could not evaluate the selector "antName" at 26
Upgrade <color=#EE9F43ff>{antName}</color> to level <color=#EE9F43ff>{level}</color>?
--------------------------^
UnityEngine.Localization.SmartFormat.SmartFormatter.FormatError (UnityEngine.Localization.SmartFormat.Core.Parsing.FormatItem errorItem, System.Exception innerException, System.Int32 startIndex, UnityEngine.Localization.SmartFormat.Core.Formatting.FormattingInfo formattingInfo) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Smart Format/SmartFormatter.cs:347)
UnityEngine.Localization.SmartFormat.SmartFormatter.Format (UnityEngine.Localization.SmartFormat.Core.Formatting.FormattingInfo formattingInfo) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Smart Format/SmartFormatter.cs:319)
UnityEngine.Localization.SmartFormat.SmartFormatter.Format (UnityEngine.Localization.SmartFormat.Core.Formatting.FormatDetails formatDetails, UnityEngine.Localization.SmartFormat.Core.Parsing.Format format, System.Object current) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Smart Format/SmartFormatter.cs:286)
UnityEngine.Localization.SmartFormat.SmartFormatter.FormatWithCache (UnityEngine.Localization.SmartFormat.Core.Formatting.FormatCache& cache, System.String format, System.IFormatProvider formatProvider, System.Collections.Generic.IList`1[T] args) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Smart Format/SmartFormatter.cs:257)
UnityEngine.Localization.Tables.StringTableEntry.GetLocalizedString (System.IFormatProvider formatProvider, System.Collections.Generic.IList`1[T] args, UnityEngine.Localization.Pseudo.PseudoLocale pseudoLocale) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Tables/StringTable.cs:177)
UnityEngine.Localization.Settings.LocalizedStringDatabase.GenerateLocalizedString (UnityEngine.Localization.Tables.StringTable table, UnityEngine.Localization.Tables.StringTableEntry entry, UnityEngine.Localization.Tables.TableReference tableReference, UnityEngine.Localization.Tables.TableEntryReference tableEntryReference, UnityEngine.Localization.Locale locale, System.Collections.Generic.IList`1[T] arguments) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Settings/Database/LocalizedStringDatabase.cs:299)
UnityEngine.Localization.LocalizedString.RefreshString () (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Localized Reference/LocalizedString.cs:230)
UnityEngine.Localization.LocalizedString.AutomaticLoadingCompleted (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle`1[TObject] loadOperation) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Localized Reference/LocalizedString.cs:773)
UnityEngine.Localization.LocalizedString.HandleLocaleChange (UnityEngine.Localization.Locale _) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Localized Reference/LocalizedString.cs:762)
UnityEngine.Localization.LocalizedString.ForceUpdate () (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Localized Reference/LocalizedString.cs:642)
UnityEngine.Localization.LocalizedString.add_StringChanged (UnityEngine.Localization.LocalizedString+ChangeHandler value) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Localized Reference/LocalizedString.cs:129)
UnityEngine.Localization.Components.LocalizeStringEvent.RegisterChangeHandler () (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Component Localizers/LocalizeStringEvent.cs:154)
UnityEngine.Localization.Components.LocalizeStringEvent.set_StringReference (UnityEngine.Localization.LocalizedString value) (at Library/PackageCache/com.unity.localization@1.4.3/Runtime/Component Localizers/LocalizeStringEvent.cs:59)
Improvement.RenderInfo (Card antCard) (at Assets/scripts/Improvement/Improvement.cs:567)
Improvement.ClickCard (Card antCard) (at Assets/scripts/Improvement/Improvement.cs:223)
WorkshopCart.Click () (at Assets/scripts/UI/WorkshopCart.cs:12)
UnityEngine.Events.InvokableCall.Invoke () (at <4014a86cbefb4944b2b6c9211c8fd2fc>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <4014a86cbefb4944b2b6c9211c8fd2fc>:0)
UnityEngine.UI.Button.Press () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:70)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/Button.cs:114)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:57)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/ExecuteEvents.cs:272)
UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)

You have an error in your smart string

Error parsing format string: Could not evaluate the selector “antName” at 26
Upgrade <color=#EE9F43ff>{antName} to level <color=#EE9F43ff>{level}?

Your string needs a variable called antName

public LocalizedString withNestedTranslation = new LocalizedString("My String Table", "My Game Text")
{
   { "some-text", new StringVariable { Value = "Hello World" } },
   // maybe antName here?
   { "nested", new LocalizedString("My String Table", "My Nested Text")
     {
         { "score", new IntVariable { Value = 100 } },
         // Maybe antName here if nested?
     }}
};

Thanks! It helped!