One-Click Translations

Welcome to the One-Click Translations Unity package! This package streamlines the localization process in Unity, enabling you to easily translate your game or application into multiple languages using OpenAI's GPT-4o-mini model. The package is designed to minimize the complexity of handling translations by providing a simple, user-friendly interface in the Unity Editor and robust runtime components.

Overview

Localization can be a daunting task, especially for indie developers who want to reach a global audience. Manually translating text into multiple languages is time-consuming and often error-prone. This package automates the translation process by leveraging AI-powered translation capabilities, allowing developers to focus on creating engaging content without worrying about language barriers.

Key Features

  • Automated Translations: Use AI to translate text into multiple languages quickly and accurately with one click.

  • Editor Integration: Manage localization settings and processes directly from the Unity Editor.

  • Customizable Language Support: Easily define and update supported languages through a ScriptableObject.

  • Scene Integration: Automatically update and manage translations for all LocalizableText components in your scenes.

  • Translation Management: Clear and reset translations with a single click.

Installation

To install the One-Click Translations package in your Unity project, follow these steps:

  1. Download and Import the Package:
    Download the package from the Unity Asset Store or your preferred source, and import it into your Unity project via Unity’s Package Manager.

  2. Setup API Key:
    You need an OpenAI API key to use the translation features. Create a ‘OpenAIAPIKey’ asset in the Unity Editor if it is not already created in the Indie > One-Click Translations > Resources:

    • Navigate to Create > Indie > One-Click Translations > OpenAIAPIKey.

    • Open the created asset and enter your OpenAI API key.

  3. Define Supported Languages:
    Customize the list of supported languages by creating a SupportedLanguages asset. You can find the SupportedLanguage scriptable object in the Indie > One-Click Translations > Resources. Or if it is not already created, you can create it like this:

    • Navigate to Create > Indie > One-Click Translations > SupportedLanguages.

    • Add or remove languages from the array in the Inspector as needed.

    • Make sure to place the instance of the scriptable object inside a Resources folder.

Usage

The package offers both Editor and runtime components for managing localization.

Editor Window

  1. Open Localization Manager:

    • Navigate to Tools > Indie > Localization Manager in the Unity Editor to open the Localization Manager window.

  2. Running the Translation Process:

    • Click the "Run Translation Process" button to start translating all text components in the current scene. A confirmation dialog will appear to ensure you're aware of the time and cost involved.

  3. Selecting Languages:

    • Use the dropdown menu to select a language from your defined list of supported languages.

    • Click "Set Current Language" to apply the selected language to your scene.

  4. Clearing Translations:

    • Click "Clear Translations" to reset all localization data in the scene. This action removes all existing translations. Only use this if you want to restart the run translation process.


Conclusion

The One-Click Translations package simplifies the localization process for Unity developers, offering a powerful and flexible solution for managing multilingual content. Whether you're an indie developer or part of a larger team, this package helps you break language barriers and reach a wider audience.