bImportLoc

bImportLoc

#Overview

name: bImportLoc

The value of this variable can be defined or overridden in .ini config files. 20 .ini config files referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bImportLoc is to control whether localization data should be imported during the internationalization process in Unreal Engine 5. This setting variable is primarily used in the localization and internationalization systems of the engine.

Based on the callsites, the following Unreal Engine subsystems and modules rely on this setting variable:

  1. Localization module
  2. TranslationEditor module
  3. UnrealEd module (specifically the InternationalizationExportCommandlet)

The value of this variable is typically set in configuration files or through the Unreal Editor’s user interface. It can be found in the UInternationalizationExportSettings class as a UPROPERTY, which suggests it can be modified through the editor or configuration files.

This variable interacts with other localization-related variables, such as bExportLoc, which controls the export of localization data. Together, these variables determine the behavior of the internationalization process.

Developers must be aware that:

  1. This variable is a boolean, so it can only be set to true or false.
  2. When set to true, it enables the import of localization data during the internationalization process.
  3. It is used in conjunction with other localization settings and should be configured appropriately based on the project’s needs.

Best practices when using this variable include:

  1. Ensure that the value is set correctly in the project’s configuration files or through the Unreal Editor interface.
  2. Use this variable in conjunction with other localization settings to achieve the desired localization workflow.
  3. Be consistent in its usage across different parts of the project to avoid confusion or unexpected behavior.
  4. Document any custom usage or modifications to this variable to maintain clear communication within the development team.

#Setting Variables

#References In INI files

<Workspace>/Engine/Config/Localization/Category.ini:54, section: [GatherTextStep3]
<Workspace>/Engine/Config/Localization/Editor.ini:98, section: [GatherTextStep5]
<Workspace>/Engine/Config/Localization/EditorTutorials.ini:54, section: [GatherTextStep3]
<Workspace>/Engine/Config/Localization/Engine.ini:76, section: [GatherTextStep4]
<Workspace>/Engine/Config/Localization/Keywords.ini:49, section: [GatherTextStep3]
<Workspace>/Engine/Config/Localization/PortableObjectImport.ini:2, section: [CommonSettings]
<Workspace>/Engine/Config/Localization/PropertyNames.ini:54, section: [GatherTextStep3]
<Workspace>/Engine/Config/Localization/ToolTips.ini:57, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/Android/OnlineSubsystemGooglePlay/Config/Localization/OnlineSubsystemGooglePlay.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/IOS/OnlineSubsystemIOS/Config/Localization/OnlineSubsystemIOS.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineFramework/Config/Localization/OnlineFramework.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystem/Config/Localization/OnlineSubsystem.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystemAmazon/Config/Localization/OnlineSubsystemAmazon.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystemFacebook/Config/Localization/OnlineSubsystemFacebook.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystemOculus/Config/Localization/OnlineSubsystemOculus.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystemSteam/Config/Localization/OnlineSubsystemSteam.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Online/OnlineSubsystemUtils/Config/Localization/OnlineSubsystemUtils.ini:46, section: [GatherTextStep3]
<Workspace>/Engine/Plugins/Runtime/HTTPChunkInstaller/Config/Localization/HTTPChunkInstaller.ini:46, section: [GatherTextStep3]
<Workspace>/Projects/Lyra/Config/Localization/EngineOverrides_Import.ini:27, section: [GatherTextStep0]
<Workspace>/Projects/Lyra/Config/Localization/Game_Import.ini:27, section: [GatherTextStep0]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocalizationConfigurationScript.cpp:596

Scope (from outer to inner):

file
namespace    LocalizationConfigurationScript
function     FLocalizationConfigurationScript GenerateImportTextConfigFile

Source code excerpt:

			ConfigSection.Add( TEXT("CommandletClass"), TEXT("InternationalizationExport") );

			ConfigSection.Add( TEXT("bImportLoc"), TEXT("true") );

			// Import-specific settings.
			{
				UEnum* LocalizedTextCollapseModeEnum = FindObjectChecked<UEnum>(nullptr, TEXT("/Script/Localization.ELocalizedTextCollapseMode"));
				const FName CollapseModeName = LocalizedTextCollapseModeEnum->GetNameByValue((int64)Target->Settings.ExportSettings.CollapseMode);
				ConfigSection.Add(TEXT("LocalizedTextCollapseMode"), CollapseModeName.ToString());

#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/UserGeneratedContentLocalization.cpp:373

Scope (from outer to inner):

file
namespace    UserGeneratedContentLocalization
function     bool ExportLocalization

Source code excerpt:

				ConfigSection.Add(TEXT("CommandletClass"), TEXT("InternationalizationExport"));

				ConfigSection.Add(TEXT("bImportLoc"), TEXT("true"));

				ConfigSection.Add(TEXT("POFormat"), StaticEnum<EPortableObjectFormat>()->GetNameStringByValue((int64)UGCLocDescriptorForImport.PoFormat));

				GatherConfig.AddGatherTextStep(GatherStepIndex++, MoveTemp(ConfigSection));
			}

#Loc: <Workspace>/Engine/Source/Editor/TranslationEditor/Private/InternationalizationExportSettings.h:49

Scope (from outer to inner):

file
class        class UInternationalizationExportSettings : public UObject

Source code excerpt:

	/** Whether or not to import localization data */
	UPROPERTY(Category = GatherTextStep, EditAnywhere, config)
	bool bImportLoc;

	/** Whether or not to use culture path */
	UPROPERTY(Category = GatherTextStep, EditAnywhere, config)
	bool bUseCultureDirectory;
};

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/InternationalizationExportCommandlet.cpp:146

Scope (from outer to inner):

file
function     int32 UInternationalizationExportCommandlet::Main

Source code excerpt:


	bool bDoImport = false;
	GetBoolFromConfig(*SectionName, TEXT("bImportLoc"), bDoImport, ConfigPath);

	bool bDoExport = false;
	GetBoolFromConfig(*SectionName, TEXT("bExportLoc"), bDoExport, ConfigPath);

	if (!bDoImport && !bDoExport)
	{