![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <PackageLocalizationUtil.h>
Static Public Member Functions | |
| static COREUOBJECT_API bool | ConvertLocalizedToSource (const FStringView &InLocalized, FString &OutSource) |
| static COREUOBJECT_API void | ConvertToSource (const FStringView &InPath, FString &OutSource) |
| static COREUOBJECT_API bool | ConvertSourceToLocalized (const FStringView &InSource, const FStringView &InCulture, FString &OutLocalized) |
| static COREUOBJECT_API bool | ConvertSourceToRegexLocalized (const FStringView &InSource, FString &OutLocalized) |
| static COREUOBJECT_API bool | GetLocalizedRoot (const FString &InPath, const FString &InCulture, FString &OutLocalized) |
| static COREUOBJECT_API bool | ExtractCultureFromLocalized (const FStringView &InLocalized, FString &OutCulture) |
| static COREUOBJECT_API void | GetLocalizedVariantsAbsolutePaths (const FStringView &InSource, TArray< FString > &OutLocalizedAbsolutePaths) |
Utility functions for dealing with localized package names
|
static |
Converts a localized version of a package path to the source version (by removing /L10N/ from the package path) Note: This does not check whether the source package exists
| InLocalized | Path to the localized package. |
| OutSource | Path to the source package. If the conversion failed, OutSource won't change. |
|
static |
Converts a source version of a package path to the localized version for the given culture (by adding /L10N/ to the package path) Note: This does not check whether the source package exists
| InSource | Path to the source package. |
| InCulture | Culture code to use. |
| OutLocalized | Path to the localized package. If the conversion failed, OutLocalized won't change. |
|
static |
Converts a source version of a package path to the regex localized version (by adding "/L10N/" + "*" to the package path) Note: This does not check whether the source package exists
| InSource | Path to the source package. |
| OutLocalized | Path to the regex localized package. If the conversion failed, OutLocalized won't change. |
|
static |
Convert a package path to its source version (by removing /L10N/ from the package path, if present) Note: This does not check whether the source package exists
| InPath | Path to a package. It can be a source asset already or a localized variant. |
| OutSource | Path to the source package. It cannot fail. If no /L10N/ were found, it is already a Source Asset. |
|
static |
Extract a culture code from a localized version of a package path (by finding /L10N/ from the package path, if present) Note: This does not check whether the source package exists
| InLocalized | Path to the localized package. |
| OutCulture | Culture code (found from /L10N/) |
True if the conversion happened, false otherwise
|
static |
Given a package path, get the localized root package for the given culture (eg, if given "/Game/MyFolder/MyAsset" and a culture of "fr", this would return "/Game/L10N/fr")
| InPath | Package path to use. |
| InCulture | Culture code to use (if any). |
| OutLocalized | Localized package root. |
|
static |
Given a package path, returns all localized variants absolute paths found on disk Note: There is a similar function to check in Revision Control (if not on disk) (see USourceControlHelpers::GetLocalizedVariantsAbsolutePaths)
| InPackageName | Package path to use. |
| OutLocalizedAbsolutePaths | Absolute paths of localized variants founds |