ToolTipLocalizationPaths
ToolTipLocalizationPaths
#Overview
name: ToolTipLocalizationPaths
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ToolTipLocalizationPaths is to specify the paths where localization data for tooltips is stored in Unreal Engine 5. This setting variable is primarily used for the localization system, specifically for managing tooltip translations in the editor.
ToolTipLocalizationPaths is relied upon by the Localization Dashboard module in the Unreal Engine editor, as seen in the LocalizationTargetDetailCustomization.cpp file. It’s also used in the Core module, particularly in the Paths.cpp file, which suggests it’s a fundamental part of the engine’s path management system.
The value of this variable is typically set in the editor configuration file (GEditorIni). It can be read and modified using the GConfig system, as shown in the GetToolTipLocalizationPaths() function in Paths.cpp.
This variable interacts with other localization-related variables such as PropertyNameLocalizationPaths and GameLocalizationPaths. They are often used together to manage different aspects of localization in the engine.
Developers should be aware that:
- If no paths are specified in the editor configuration, a warning will be logged.
- There’s a hardcoded default path ("../../../Engine/Content/Localization/ToolTips") used when the configuration is not ready or available.
Best practices when using this variable include:
- Ensuring that the specified paths actually contain the necessary localization data for tooltips.
- Keeping the paths consistent across different parts of the project to avoid confusion.
- Using the GConfig system to read and modify these paths rather than hardcoding them in multiple places.
- Regularly checking the logs for any warnings related to missing or invalid localization paths.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:15, section: [Internationalization]
- INI Section:
Internationalization
- Raw value:
../../../Engine/Content/Localization/ToolTips
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/LocalizationDashboard/Private/LocalizationTargetDetailCustomization.cpp:120
Scope (from outer to inner):
file
namespace anonymous
lambda-function
Source code excerpt:
Array.Emplace(ELocalizationTargetLoadingPolicy::Game, TEXT("Internationalization"), TEXT("LocalizationPaths"), TEXT("Game"), GGameIni);
Array.Emplace(ELocalizationTargetLoadingPolicy::PropertyNames, TEXT("Internationalization"), TEXT("PropertyNameLocalizationPaths"), TEXT("Editor"), GEditorIni);
Array.Emplace(ELocalizationTargetLoadingPolicy::ToolTips, TEXT("Internationalization"), TEXT("ToolTipLocalizationPaths"), TEXT("Editor"), GEditorIni);
return Array;
}();
}
FLocalizationTargetDetailCustomization::FLocalizationTargetDetailCustomization()
: DetailLayoutBuilder(nullptr)
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/Paths.cpp:48
Scope: file
Source code excerpt:
TArray<FString> CookedEditorLocalizationPaths;
TArray<FString> PropertyNameLocalizationPaths;
TArray<FString> ToolTipLocalizationPaths;
TArray<FString> GameLocalizationPaths;
TArray<FString> RestrictedFolderNames;
TArray<FString> RestrictedSlashedFolderNames;
FString RelativePathToRoot;
bool bUserDirArgInitialized = false;
#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Misc/Paths.cpp:709
Scope (from outer to inner):
file
function const TArray<FString>& FPaths::GetToolTipLocalizationPaths
Source code excerpt:
if(GConfig && GConfig->IsReadyForUse())
{
GConfig->GetArray( TEXT("Internationalization"), TEXT("ToolTipLocalizationPaths"), StaticData.ToolTipLocalizationPaths, GEditorIni );
if(!StaticData.ToolTipLocalizationPaths.Num())
{
UE_LOG(LogInit, Warning, TEXT("No paths for tooltips localization data were specifed in the editor configuration."));
}
StaticData.bToolTipLocalizationPathsInitialized = true;
}
else
{
StaticData.ToolTipLocalizationPaths.AddUnique(TEXT("../../../Engine/Content/Localization/ToolTips")); // Hardcoded convention.
}
}
return StaticData.ToolTipLocalizationPaths;
}
const TArray<FString>& FPaths::GetGameLocalizationPaths()
{
FStaticData& StaticData = TLazySingleton<FStaticData>::Get();