# FLocTextHelper

High-level access to the non-compiled localization resources (manifests and archives) in a way that abstracts some of their quirks.

## Navigation

Unreal Engine C++ API Reference > Developer > Localization

## References

Module | Localization
Header | /Engine/Source/Developer/Localization/Public/LocTextHelper.h
Include | #include "LocTextHelper.h"

## Syntax

    class FLocTextHelper

## Remarks

High-level access to the non-compiled localization resources (manifests and archives) in a way that abstracts some of their quirks. Each instance gives access to a single localization target consisting of a single manifest and several archives (a native archive, and one for each foreign culture).

## Constructors

Type | Name | Description
--- | --- | ---
| FLocTextHelper ( FString InTargetName, TSharedPtr< ILocFileNotifies > InLo..., const ELocTextPlatformSplitMode InP... ) | Construct an empty helper.
| FLocTextHelper ( FString InTargetPath, FString InManifestName, FString InArchiveName, FString InNativeCulture, TArray< FString > InForeignCultures, TSharedPtr< ILocFileNotifies > InLo..., const ELocTextPlatformSplitMode InP... ) | Construct a helper for the given target information.

## Functions

Type | Name | Description
--- | --- | ---
void | AddConflict ( const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const FLocItem& InSource, const FString& InSourceLocation ) | Add a new conflict entry.
bool | AddDependency ( const FString& InDependencyFilePat..., FText* OutError ) | Attempt to add a manifest dependency.
bool | AddSourceText ( const FLocKey& InNamespace, const FLocItem& InSource, const FManifestContext& InContext, const FString* InDescription ) | Add a new source text entry to the manifest.
bool | AddTranslation ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const FLocItem& InSource, const FLocItem& InTranslation, const bool InOptional ) | Add a new translation to the given archive.
bool | AddTranslation ( const FString& InCulture, const TSharedRef< FArchiveEntry >&... ) | Add a new translation to the given archive.
void | EnumerateSourceTexts ( const FEnumerateSourceTextsFuncPtr ..., const bool InCheckDependencies ) |
void | EnumerateTranslations ( const FString& InCulture, const FEnumerateTranslationsFuncPtr..., const bool InCheckDependencies ) |
TSharedPtr< ... | FindDependencyEntry ( const FLocKey& InNamespace, const FLocKey& InKey, const FString* InSourceText, FString* OutDependencyFilePath ) | Find an dependency entry using its namespace and key.
TSharedPtr< ... | FindDependencyEntry ( const FLocKey& InNamespace, const FManifestContext& InContext, FString* OutDependencyFilePath ) | Find an existing dependency entry using its namespace and context.
bool | FindKeysForLegacyTranslation ( const TSharedRef< const FInternatio..., const TSharedPtr< const FInternatio..., const FLocKey& InNamespace, const FString& InSource, const TSharedPtr< FLocMetadataObjec..., TArray< FLocKey >& OutKeys ) | Given a manifest and (optional) native archive, try and find all the keys that the source string should use by checking the manifest.
bool | FindKeysForLegacyTranslation ( const FString& InCulture, const FLocKey& InNamespace, const FString& InSource, const TSharedPtr< FLocMetadataObjec..., TArray< FLocKey >& OutKeys ) | Given a culture, try and find all the keys that the source string should use by checking the manifest.
TSharedPtr< ... | FindSourceText ( const FLocKey& InNamespace, const FLocKey& InKey, const FString* InSourceText ) | Find an existing source text entry using its namespace and key.
TSharedPtr< ... | FindSourceText ( const FLocKey& InNamespace, const FManifestContext& InContext ) | Find an existing source text entry using its namespace and context.
TSharedPtr< ... | FindTranslation ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec... ) | Find an existing translation entry from its source text.
TArray< FStr... | GetAllCultures ( const bool bSingleCultureMode ) |
FString | GetConflictReport () | Get a conflict report that can be easily saved as a report summary.
const FStrin... | GetCopyrightNotice () |
void | GetExportText ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const ELocTextExportSourceMethod In..., const FLocItem& InSource, FLocItem& OutSource, FLocItem& OutTranslation ) | Given some source text, work out which text should be exported (eg, when exporting to PO).
const TArray... | GetForeignCultures () |
TSharedPtr< ... | GetLocFileNotifies () |
const FStrin... | GetNativeCulture () |
ELocTextPlat... | GetPlatformSplitMode () | How are we splitting localization data per-platform?
const TArray... | GetPlatformsToSplit () | Get the platforms names that should be split, based on the active split mode.
void | GetRuntimeText ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const ELocTextExportSourceMethod In..., const FLocItem& InSource, FLocItem& OutTranslation, const bool bSkipSourceCheck ) | Given some source text, work out which text is our current "best" translation (eg, when compiling to LocRes).
const FStrin... | GetTargetName () |
const FStrin... | GetTargetPath () |
FLocTextWord... | GetWordCountReport ( const FDateTime& InTimestamp, const TCHAR* InBaseReportFileP... ) | Get a word count report for the current state of the manifest and archives.
bool | HasArchive ( const FString& InCulture ) | Check to see whether we've loaded the given archive (native or foreign).
bool | HasForeignArchive ( const FString& InCulture ) | Check to see whether we've loaded the given foreign archive.
bool | HasManifest () | Check to see whether we've loaded the manifest.
bool | HasNativeArchive () | Check to see whether we've loaded the native archive.
bool | ImportTranslation ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const FLocItem& InSource, const FLocItem& InTranslation, const bool InOptional ) | Import a previously exported translation (generated using GetExportText) back into the archive.
bool | LoadAll ( const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) the manifest and all archive files specified during construction.
bool | LoadAllArchives ( const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) all archive files.
bool | LoadArchive ( const FString& InCulture, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) an archive file (native or foreign).
bool | LoadArchive ( const FString& InCulture, const FString& InArchiveFilePath, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) an foreign file (native or foreign) from the given file path.
bool | LoadForeignArchive ( const FString& InCulture, const FString& InArchiveFilePath, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) a foreign archive file from the given file path.
bool | LoadForeignArchive ( const FString& InCulture, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) a foreign archive file.
bool | LoadManifest ( const FString& InManifestFilePath, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) the manifest file from the given file path.
bool | LoadManifest ( const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) the manifest file.
bool | LoadNativeArchive ( const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) the native archive file.
bool | LoadNativeArchive ( const FString& InArchiveFilePath, const ELocTextHelperLoadFlags InLoa..., FText* OutError ) | Attempt to load (or create) the native archive file from the given file path.
FString | SanitizeLogOutput ( FStringView InString ) | Sanitize any output from the given string that may cause the build machine to generate erroneous errors.
FString | SanitizeLogOutput ( FString&& InString ) | Sanitize any output from the given string that may cause the build machine to generate erroneous errors.
bool | SaveAll ( FText* OutError ) | Attempt to save the manifest and all archive files specified during construction.
bool | SaveAllArchives ( FText* OutError ) | Attempt to save all (native and foreign) archive files.
bool | SaveArchive ( const FString& InCulture, FText* OutError ) | Attempt to save an archive file (native or foreign).
bool | SaveArchive ( const FString& InCulture, const FString& InArchiveFilePath, FText* OutError ) | Attempt to save an archive file (native or foreign) to the given file path.
bool | SaveConflictReport ( const FString& InReportFilePath, EConflictReportFormat InConflictRep..., FText* OutError ) | Save the conflict report summary to disk.
bool | SaveForeignArchive ( const FString& InCulture, const FString& InArchiveFilePath, FText* OutError ) | Attempt to save a foreign archive file to the given file path.
bool | SaveForeignArchive ( const FString& InCulture, FText* OutError ) | Attempt to save a foreign archive file.
bool | SaveManifest ( const FString& InManifestFilePath, FText* OutError ) | Attempt to save the manifest file to the given file path.
bool | SaveManifest ( FText* OutError ) | Attempt to save the manifest file.
bool | SaveNativeArchive ( FText* OutError ) | Attempt to save the native archive file.
bool | SaveNativeArchive ( const FString& InArchiveFilePath, FText* OutError ) | Attempt to save the native archive file to the given file path.
bool | SaveWordCountReport ( const FDateTime& InTimestamp, const FString& InReportFilePath, FText* OutError ) | Save the word count report for the current state of the manifest and archives to disk.
bool | SerializeManifestToJson ( TSharedRef< FJsonObject > JsonObjec... ) | Attempt to serialize the entire manifest to an input json object
void | SetCopyrightNotice ( const FString& InCopyrightNotice ) | Set the optional copyright notice to insert into files that support it.
bool | ShouldSplitPlatformData () | Are we splitting localization data per-platform?
void | TrimArchive ( const FString& InCulture ) | Trim the given archive by remove any entries that no longer exist in the manifest.
void | TrimManifest () | Trim the currently loaded manifest by remove all dependency entries from it.
void | UpdateSourceText ( const TSharedRef< FManifestEntry > ..., TSharedRef< FManifestEntry >& InNe... ) | Update an existing source text entry in the manifest.
void | UpdateTranslation ( const FString& InCulture, const TSharedRef< FArchiveEntry >&..., const TSharedRef< FArchiveEntry >&... ) | Update an existing translation in the given archive.
bool | UpdateTranslation ( const FString& InCulture, const FLocKey& InNamespace, const FLocKey& InKey, const TSharedPtr< FLocMetadataObjec..., const FLocItem& InSource, const FLocItem& InTranslation ) | Update an existing translation in the given archive.

## Typedefs

Name | Description
--- | ---
FEnumerateSourceTextsFuncPtr | Enumerate all the source texts in the manifest, optionally skipping those entries from a dependent manifest.
FEnumerateTranslationsFuncPtr | Enumerate all the translations for the given culture.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library

On this page

- Navigation
- References
- Syntax
- Remarks
- Constructors
- Functions
- Typedefs

## Privacy Preference Center

### Your Privacy

When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer. More information

- ### Strictly Necessary Cookies

  Always Active
  Strictly Necessary Cookies

  These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

  Cookies Details‎

- ### Performance Cookies

  Performance Cookies

  These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

  Cookies Details‎

- ### Functional Cookies

  Functional Cookies

  These cookies enable the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

  Cookies Details‎

Consent Leg.Interest
Select All Vendors
Select All Vendors
Select All Hosts

Select All

- REPLACE-WITH-DYANMIC-HOST-ID

  ### 33Across

  View Third Party Cookies
  - Name
    cookie name

- REPLACE-WITH-DYANMIC-VENDOR-ID

  ### 33Across

  3 Purposes

  View Privacy Notice

  ### 33Across

  3 Purposes

  View Privacy Notice
  REPLACE-WITH-DYANMIC-VENDOR-ID

  Consent Purposes

  Location Based Ads

  Consent Allowed

  Legitimate Interest Purposes

  Personalize

  Require Opt-Out

  Special Purposes

  Location Based Ads

  Features

  Location Based Ads

  Special Features

  Location Based Ads

Clear Filters

Information storage and access

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and personalize content.Privacy Policy