LanguageSystem Pro
  • Welcome
  • Getting Started
    • Quickstart
    • Importing and Exporting
    • InternalDatabase Mode
    • ExternalFiles Mode
    • GlobalExternal Mode
    • ComponentBased Mode
    • Importing Translated Text into Custom Script
    • LanguageAudioManager
    • AudioWarper Component
    • Importing Audio into Custom Script
    • Switching Languages
    • LanguageManagerEditor
Powered by GitBook
On this page
  • LanguageSystem Pro: Step-by-Step Guide
  • Modes Overview
  1. Getting Started

Quickstart

Getting Started: In the following sections, you'll learn how to set up LanguageSystem Pro, integrate it into your project, and configure it to meet the needs of your application.

PreviousWelcomeNextImporting and Exporting

Last updated 8 months ago

Let's begin by exploring the installation process and basic configuration steps to get your language system up and running!

LanguageSystem Pro: Step-by-Step Guide

Welcome to the complete guide for using LanguageSystem Pro in your Unity projects. This document will walk you through each mode available in the system and how to import, export, and manage language data efficiently.

LanguageSystem Pro supports multiple formats (JSON, XML, CSV) and offers both internal and external language management options. Additionally, this guide will introduce you to our free desktop tool, LanguageManagerEditor, which simplifies the process of managing your language files.

Modes Overview

LanguageSystem Pro provides four modes to handle language data. Each mode serves different project needs, whether you're working with internal resources, external files, or global language data. Below is an explanation of each mode and how to use them effectively:

1. Internal Database Mode

In Internal Database Mode, all translations are stored directly inside the Unity project, which is ideal for smaller projects where you want to bundle language data within the game files.

  • How to Use: You can add translations by directly editing the TextEntries list in the LanguageManager component. This mode does not require external files, making it straightforward for smaller projects or when no external localization system is needed.

  • Advantages:

    • Quick and easy for small projects.

    • No need to manage external files.

  • Disadvantages:

    • Not ideal for large projects with frequent updates to translations.

    • Any change to language data requires re-building the project.

2. External Files Mode

In External Files Mode, translations are stored as separate files in the StreamingAssets folder. You can manage languages individually, using files named after each language code (e.g., en.json, es.xml, pt-br.csv).

  • How to Use: Place language files in the StreamingAssets/Languages/ folder. Each file should be named according to its language code (en.json, pt-br.xml, etc.). These files can be in JSON, XML, or CSV format, and the system will load them at runtime.

  • Advantages:

    • Easy to update translations without needing to re-build the project.

    • Developers can add or remove languages by simply modifying the StreamingAssets folder.

  • Disadvantages:

    • Requires proper file management in the StreamingAssets folder.

  • Example Directory Structure:

StreamingAssets/
    Languages/
        en.json
        es.json
        pt-br.json
        

3. Global External Files Mode

This mode allows you to store all translations in a single global file. This is useful for managing translations in one place, avoiding the need for multiple files.

  • How to Use: Place a file named globalLanguages in the StreamingAssets/Languages/ folder. This file can also be in JSON, XML, or CSV format. The system will load all language data from this global file.

  • Advantages:

    • Centralized management of translations.

    • Easy to maintain consistency across all languages.

  • Disadvantages:

    • For very large projects, a global file can become cumbersome to edit.

  • Example File: A global file (globalLanguages.json, globalLanguages.xml, or globalLanguages.csv) will contain all the translations for all languages in one place.

4. Component-Based Mode

In Component-Based Mode, individual UI components can define their translations. This mode allows you to directly attach translations to objects in the Unity Editor. This is useful for highly customized localization setups.

  • How to use: Add the LocalizedText script to any Text or TextMeshProUGUI and set your TextID and translations for each language. LanguageSystem Pro will dynamically update the text based on the active language.

  • Advantages:

    • Fine-grained control over individual UI elements.

    • Easily supports dynamic language switching.

  • Disadvantages:

    • Requires setting up each component manually.