Language: Difference between revisions

From Burnout Wiki
Content added Content deleted
m (Table normalization)
(Conform to format documentation guidelines and add CgsUtf8 typedef.)
Line 1: Line 1:
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.
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.


= Layout =
= Structures =
== 32-bit ==
== 32-bit ==
=== LanguageResource ===
=== CgsResource::LanguageResource ===
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 11: Line 11:
| 0x4 || 0x4 || uint32_t || muSize || Number of entries ||
| 0x4 || 0x4 || uint32_t || muSize || Number of entries ||
|-
|-
| 0x8 || 0x4 || LanguageResourceHashEntry* || mpEntries || Entries ||
| 0x8 || 0x4 || [[#CgsResource::LanguageResourceHashEntry | LanguageResourceHashEntry]]* || mpEntries || Entries ||
|}
|}


=== CgsResource::LanguageResourceHashEntry ===
=== LanguageHashEntry ===
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 20: Line 20:
| 0x0 || 0x4 || uint32_t || muHash || Hash of untranslated string (string ID) ||
| 0x0 || 0x4 || uint32_t || muHash || Hash of untranslated string (string ID) ||
|-
|-
| 0x4 || 0x4 || CgsUtf8* || mpString || Translated UTF-8 string ||
| 0x4 || 0x4 || [[#CgsUnicode::UnicodeBuffer::CgsUtf8 | CgsUtf8]]* || mpString || Translated UTF-8 string ||
|}
|}


== 64-bit ==
== 64-bit ==
=== LanguageResource ===
=== CgsResource::LanguageResource ===
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 32: Line 32:
| 0x4 || 0x4 || uint32_t || muSize || Number of entries ||
| 0x4 || 0x4 || uint32_t || muSize || Number of entries ||
|-
|-
| 0x8 || 0x8 || LanguageResourceHashEntry* || mpEntries || Entries ||
| 0x8 || 0x8 || [[#CgsResource::LanguageResourceHashEntry 2 | LanguageResourceHashEntry]]* || mpEntries || Entries ||
|}
|}

=== LanguageHashEntry ===
=== CgsResource::LanguageResourceHashEntry ===
{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 42: Line 43:
| 0x4 || 0x4 || || || padding ||
| 0x4 || 0x4 || || || padding ||
|-
|-
| 0x8 || 0x8 || CgsUtf8* || mpString || Translated UTF-8 string ||
| 0x8 || 0x8 || [[#CgsUnicode::UnicodeBuffer::CgsUtf8 | CgsUtf8]]* || mpString || Translated UTF-8 string ||
|}

= Typedefs =
=== CgsUnicode::UnicodeBuffer::CgsUtf8 ===
{| class="wikitable"
|-
! Name !! Type !! Length !! Comments
|-
| CgsUtf8 || uint8_t || 0x1 ||
|}
|}



Revision as of 04:17, 14 August 2022

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.

Structures

32-bit

CgsResource::LanguageResource

Offset Length Type Name Description Comments
0x0 0x4 uint32_t meLanguageID Language file ID See ELanguage
0x4 0x4 uint32_t muSize Number of entries
0x8 0x4 LanguageResourceHashEntry* mpEntries Entries

CgsResource::LanguageResourceHashEntry

Offset Length Type Name Description Comments
0x0 0x4 uint32_t muHash Hash of untranslated string (string ID)
0x4 0x4 CgsUtf8* mpString Translated UTF-8 string

64-bit

CgsResource::LanguageResource

Offset Length Type Name Description Comments
0x0 0x4 uint32_t meLanguageID Language file ID See ELanguage
0x4 0x4 uint32_t muSize Number of entries
0x8 0x8 LanguageResourceHashEntry* mpEntries Entries

CgsResource::LanguageResourceHashEntry

Offset Length Type Name Description Comments
0x0 0x4 uint32_t muHash Hash of untranslated string (string ID)
0x4 0x4 padding
0x8 0x8 CgsUtf8* mpString Translated UTF-8 string

Typedefs

CgsUnicode::UnicodeBuffer::CgsUtf8

Name Type Length Comments
CgsUtf8 uint8_t 0x1

Enumerations

CgsLanguage::Sku::ELanguage

Name Value Comments
E_LANGUAGE_INVALID -1
E_LANGUAGE_ARABIC 0
E_LANGUAGE_CHINESE 1
E_LANGUAGE_CHINESE_SIMPLIFIED 2 Bundle 0012
E_LANGUAGE_CHINESE_TRADITIONAL 3 Bundle 0013
E_LANGUAGE_CZECH 4 Bundle 0010
E_LANGUAGE_DANISH 5
E_LANGUAGE_DUTCH 6
E_LANGUAGE_ENGLISH_US 7 Bundle 0001
E_LANGUAGE_ENGLISH_UK 8 Bundle 0002
E_LANGUAGE_FINNISH 9
E_LANGUAGE_FRENCH 10 Bundle 0003
E_LANGUAGE_GERMAN 11 Bundle 0006
E_LANGUAGE_GREEK 12 Bundle 0008
E_LANGUAGE_HEBREW 13
E_LANGUAGE_HUNGARIAN 14 Bundle 0011
E_LANGUAGE_ITALIAN 15 Bundle 0005
E_LANGUAGE_JAPANESE 16 Bundle 0007
E_LANGUAGE_KOREAN 17
E_LANGUAGE_NORWEGIAN 18
E_LANGUAGE_POLISH 19 Bundle 0009
E_LANGUAGE_PORTUGUESE_BRAZIL 20
E_LANGUAGE_PORTUGUESE_PORTUGAL 21
E_LANGUAGE_SPANISH 22 Bundle 0004
E_LANGUAGE_SWEDISH 23
E_LANGUAGE_THAI 24 Bundle 0014
E_LANGUAGE_TOTAL 25