ShouldUseLocalizedPropertyNames

ShouldUseLocalizedPropertyNames

#Overview

name: ShouldUseLocalizedPropertyNames

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 6 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of ShouldUseLocalizedPropertyNames is to control whether property names in the Unreal Engine editor should be displayed in localized form or not. This setting is part of the internationalization system of Unreal Engine.

This setting variable is primarily used by the Internationalization subsystem of Unreal Engine. It is referenced in the InternationalizationSettings module and the Core runtime module.

The value of this variable is set in the GEditorSettingsIni configuration file under the “Internationalization” section. It can be modified through the UInternationalizationSettingsModel class, which provides getter and setter methods for this setting.

This variable interacts with other localization-related settings, such as ShouldUseLocalizedNumericInput and ShouldUseLocalizedNodeAndPinNames. Together, these settings control various aspects of the editor’s localization behavior.

Developers should be aware that this setting affects the display of property names in the editor. When enabled, it causes the engine to load additional localization resources for property names, which may have performance implications.

Best practices when using this variable include:

  1. Consider the target audience of your project. If your team is international or you’re developing a game for multiple languages, enabling this setting can improve the workflow for non-English speaking team members.
  2. Be consistent with other localization settings to provide a uniform experience.
  3. Test the performance impact of enabling this setting, especially for large projects with many custom properties.
  4. Ensure that all necessary localization resources are available when this setting is enabled to avoid missing translations.
  5. When distributing your project or sharing it with other team members, communicate clearly about the state of this setting to avoid confusion.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditorSettings.ini:7, section: [Internationalization]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Editor/InternationalizationSettings/Classes/InternationalizationSettingsModel.h:135

Scope (from outer to inner):

file
class        class UInternationalizationSettingsModel : public UObject

Source code excerpt:

	bool ShouldUseLocalizedNumericInput() const;
	void SetShouldUseLocalizedNumericInput(const bool Value);
	bool ShouldUseLocalizedPropertyNames() const;
	void SetShouldUseLocalizedPropertyNames(const bool Value);
	bool ShouldUseLocalizedNodeAndPinNames() const;
	void SetShouldUseLocalizedNodeAndPinNames(const bool Value);

	int32 GetTimezoneValue() const;

#Loc: <Workspace>/Engine/Source/Editor/InternationalizationSettings/Private/InternationalizationSettingsModel.cpp:34

Scope (from outer to inner):

file
function     void UInternationalizationSettingsModel::ResetToDefault

Source code excerpt:


	GConfig->SetBool( TEXT("Internationalization"), TEXT("ShouldUseLocalizedNumericInput"), true, GEditorSettingsIni );
	GConfig->SetBool( TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), true, GEditorSettingsIni );
	GConfig->SetBool( TEXT("Internationalization"), TEXT("ShouldUseLocalizedNodeAndPinNames"), true, GEditorSettingsIni );

	GConfig->Flush(false, GEditorSettingsIni);

	FTextLocalizationManager::Get().ConfigureGameLocalizationPreviewLanguage(FString());
}

#Loc: <Workspace>/Engine/Source/Editor/InternationalizationSettings/Private/InternationalizationSettingsModel.cpp:96

Scope (from outer to inner):

file
function     bool UInternationalizationSettingsModel::ShouldUseLocalizedPropertyNames

Source code excerpt:

}

bool UInternationalizationSettingsModel::ShouldUseLocalizedPropertyNames() const
{
	bool bShouldUseLocalizedPropertyNames = false;
	GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), bShouldUseLocalizedPropertyNames, GEditorSettingsIni);
	return bShouldUseLocalizedPropertyNames;
}

void UInternationalizationSettingsModel::SetShouldUseLocalizedPropertyNames(const bool Value)
{
	GConfig->SetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), Value, GEditorSettingsIni);
	GConfig->Flush(false, GEditorSettingsIni);
}

bool UInternationalizationSettingsModel::ShouldUseLocalizedNodeAndPinNames() const
{
	bool bShouldUseLocalizedNodeAndPinNames = false;

#Loc: <Workspace>/Engine/Source/Editor/InternationalizationSettings/Private/InternationalizationSettingsModelDetails.cpp:470

Scope (from outer to inner):

file
function     void FInternationalizationSettingsModelDetails::CustomizeDetails
lambda-function

Source code excerpt:

			.IsChecked_Lambda([=]()
			{
				return SettingsModel.IsValid() && SettingsModel->ShouldUseLocalizedPropertyNames() ? ECheckBoxState::Checked : ECheckBoxState::Unchecked;
			})
			.ToolTipText(PropertyNamesSettingToolTip)
			.OnCheckStateChanged_Lambda([=](ECheckBoxState State)
			{
				if (SettingsModel.IsValid())
				{

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Internationalization/LocalizationResourceTextSource.cpp:108

Scope (from outer to inner):

file
function     void FLocalizationResourceTextSource::LoadLocalizedResources

Source code excerpt:


		bool bShouldUseLocalizedPropertyNames = false;
		if (!GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), bShouldUseLocalizedPropertyNames, GEditorSettingsIni))
		{
			GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), bShouldUseLocalizedPropertyNames, GEngineIni);
		}

		if (bShouldUseLocalizedPropertyNames)
		{
			EditorLocalizationPaths += FPaths::GetPropertyNameLocalizationPaths();
		}

#Loc: <Workspace>/Engine/Source/Runtime/Projects/Private/LocalizationDescriptor.cpp:262

Scope (from outer to inner):

file
function     bool FLocalizationTargetDescriptor::ShouldLoadLocalizationTarget

Source code excerpt:

		{
			bool bShouldUseLocalizedPropertyNames = false;
			if (!GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), bShouldUseLocalizedPropertyNames, GEditorSettingsIni))
			{
				GConfig->GetBool(TEXT("Internationalization"), TEXT("ShouldUseLocalizedPropertyNames"), bShouldUseLocalizedPropertyNames, GEngineIni);
			}
			return bShouldUseLocalizedPropertyNames;
		}
#else	// WITH_EDITOR
		return false;
#endif	// WITH_EDITOR