diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index ee4eb922dd..68a68b0088 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -44,6 +44,7 @@ #include "core/io/resource_uid.h" #include "core/math/random_pcg.h" #include "core/os/shared_object.h" +#include "core/string/translation_server.h" #include "core/version.h" #include "editor/editor_node.h" #include "editor/editor_string_names.h" @@ -1008,13 +1009,16 @@ Dictionary EditorExportPlatform::get_internal_export_files(const Ref translations = get_project_setting(p_preset, "internationalization/locale/translations"); - translations.push_back(get_project_setting(p_preset, "internationalization/locale/fallback")); for (const String &t : translations) { - if (TS->is_locale_using_support_data(t)) { + Ref tr = ResourceLoader::load(t); + if (tr.is_valid() && TS->is_locale_using_support_data(tr->get_locale())) { include_data = true; break; } } + if (TS->is_locale_using_support_data(get_project_setting(p_preset, "internationalization/locale/fallback"))) { + include_data = true; + } } if (include_data) { String ts_name = TS->get_support_data_filename();