Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Read key
- FString Key;
- Archive << Key;
- FEntryArray& EntryArray = KeyTable.FindOrAdd(*Key);
- FEntry NewEntry;
- NewEntry.LocResID = LocalizationResourceIdentifier;
- // Read string entry.
- Archive << NewEntry.SourceStringHash;
- if (VersionNumber >= FTextLocalizationResourceVersion::ELocResVersion::Compact)
- {
- int32 LocalizedStringIndex = INDEX_NONE;
- Archive << LocalizedStringIndex;
- if (LocalizedStringArray.IsValidIndex(LocalizedStringIndex))
- {
- NewEntry.LocalizedString = LocalizedStringArray[LocalizedStringIndex];
- }
- else
- {
- UE_LOG(LogTextLocalizationResource, Warning, TEXT("LocRes '%s' has an invalid localized string index for namespace '%s' and key '%s'. This entry will have no translation."), *LocalizationResourceIdentifier, *Namespace, *Key);
- }
- }
- else
- {
- Archive << NewEntry.LocalizedString;
- }
- EntryArray.Add(NewEntry);
Advertisement
Add Comment
Please, Sign In to add comment