Language Manager
Last updated
Last updated
LanguageSystemPro is a separate asset that I chose to make available along with the BulletHell Elemental template, and the complete documentation for this system can be found at: https://bizachi-dev.gitbook.io/languagesystem-pro
LanguageSystemPro has some modes of operation with external files, but since some menus needed to implement the translation for error messages that the code itself applies to the text, we will use the InternalDatabase mode in all cases for this project and, therefore, to add new translations it is necessary to go to the languageManager and add these translations. The External Files and Global External Files modes have the possibility of adding translations to the Json CSV or XML file without having to edit or recreate the game's executable or APK, but as mentioned before they will not work in this project.
1. disableTMPWarnings
(Type: bool)
When enabled, suppresses TextMeshPro warnings to reduce console clutter.
2. enableTextFormatting
(Type: bool)
If true, text retrieved from translations is processed for escape sequences and custom formatting markers (such as converting "\n" to newline or "[b]...[/b]" to bold).
3. languageMode
(Type: LanguageMode)
Determines the data source for translations. Options include:
InternalDatabase: Uses translations stored in internal lists.
ExternalFiles: Loads translations from external files in the StreamingAssets folder.
ComponentBased: (Reserved for component-based approaches.)
GlobalExternalFiles: Loads translations from a global file accessible by all components.
4. currentLanguageID
(Type: string)
Specifies the ID of the current language. This value is saved locally and is used to select the correct translations from the database or external files.
5. Languages
(Type: List<Language>)
A list of available languages. Each language entry includes properties such as a unique language ID, display title, icon, and font settings for both TextMeshPro and Unity UI.
6. TextEntries
(Type: List<TextEntry>)
A list containing text entries for localization. Each TextEntry holds a text identifier and a collection of translations for different languages.