Language: Difference between revisions

m
Normalization
m (Table normalization)
m (Normalization)
 
(10 intermediate revisions by the same user not shown)
Line 1:
{{ParadiseResourceTypeInfobox
| name = Language
| example = [[File:Paradise Language Example.png|frameless|320px]]<br />English.lang viewed in Bundle Manager.
| resourcenames = *.lang<br /><sup><small>*Language name, e.g. English_UK</small></sup>
| id = 0x27
| category = Generic
| memdist = Main Memory only
| editor = Yes<br />Use [https://github.com/burninrubber0/Bundle-Manager/releases/latest Bundle Manager]
}}
 
Language resources contain the majority of strings displayed in the game, as well as all non-English strings. Each Language resource contains the same IDs (for the most part) so a single string ID may be translated into multiple languages. Strings are stored as UTF-8 character arrays.
 
= LayoutStructures =
=== CgsResource::LanguageResource ===
== 32-bit ==
==== LanguageResource32-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || meLanguageID || Language file ID || See [[#CgsLanguage::Sku::ELanguage | ELanguage]]
|-
| 0x4 || 0x4 || uint32_t || muSize || Number of entries ||
|-
| 0x8 || 0x4 || [[#CgsResource::LanguageResourceHashEntry|LanguageResourceHashEntry]]* || mpEntries || Entries ||
|}
 
==== LanguageHashEntry64-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || muHashmeLanguageID || HashLanguage of untranslated string (stringfile ID) || See [[#CgsLanguage::Sku::ELanguage|ELanguage]]
|-
| 0x4 || 0x4 || CgsUtf8*uint32_t || mpStringmuSize || TranslatedNumber UTF-8of stringentries ||
|-
| 0x8 || 0x8 || [[#CgsResource::LanguageResourceHashEntry|LanguageResourceHashEntry]]* || mpEntries || Entries ||
|}
 
=== CgsResource::LanguageResourceHashEntry ===
== 64-bit ==
==== LanguageResource32-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || meLanguageIDmuHash || LanguageHash fileof IDuntranslated ||string See(string [[#CgsLanguage::Sku::ELanguageID) || ELanguage]]
|-
| 0x4 || 0x4 || uint32_t[[CgsUtf8]]* || muSizempString || NumberTranslated ofUTF-8 entriesstring ||
|-
| 0x8 || 0x8 || LanguageResourceHashEntry* || mpEntries || Entries ||
|}
 
=== LanguageHashEntry ===
==== 3264-bit ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 40 ⟶ 51:
| 0x0 || 0x4 || uint32_t || muHash || Hash of untranslated string (string ID) ||
|-
| 0x4 || 0x4 || || || paddingPadding ||
|-
| 0x8 || 0x8 || [[CgsUtf8]]* || mpString || Translated UTF-8 string ||
|}