All Projects → BraceYourselfGames → UE4-BYGLocalization

BraceYourselfGames / UE4-BYGLocalization

Licence: BSD-3-Clause license
Simple CSV localization system for Unreal Engine 4

Programming Languages

C++
36643 projects - #6 most used programming language
C#
18002 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to UE4-BYGLocalization

Awesome Unreal Engine 4
UE4/UE5 Ressources Collection (Plugins, Effects, Doc, Tools, etc...)
Stars: ✭ 153 (+183.33%)
Mutual labels:  engine, unreal, ue4, ue4-plugin
UE4-BUIValidator
UE4 UI Texture Validator Plugin
Stars: ✭ 48 (-11.11%)
Mutual labels:  engine, unreal, ue4, ue4-plugin
RyansUE4Helpers
Extremely helpful helper functions for developing Blueprint and C++ projects in Unreal Engine.
Stars: ✭ 55 (+1.85%)
Mutual labels:  unreal, ue4, ue4-plugin
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (-53.7%)
Mutual labels:  unreal, ue4, ue4-plugin
UT GameEventSystem
A flexible event system in Unreal Engine 4
Stars: ✭ 33 (-38.89%)
Mutual labels:  engine, unreal, ue4
Discord-UE4
Plugin for integrating Discord Rich Presence.
Stars: ✭ 66 (+22.22%)
Mutual labels:  engine, unreal, ue4
ProceduralDungeon
This is an Unreal Engine 4/5 plugin to generate procedural dungeon.
Stars: ✭ 95 (+75.93%)
Mutual labels:  unreal, ue4, ue4-plugin
Ue4linuxlauncher
Stars: ✭ 79 (+46.3%)
Mutual labels:  engine, unreal, ue4
Gascontent
Repo to gather all Gameplay Ability System content for UE4
Stars: ✭ 398 (+637.04%)
Mutual labels:  engine, unreal, ue4
TwitchAuth
Unreal Engine 4 Plugin for In-Game Twitch Authentication.
Stars: ✭ 21 (-61.11%)
Mutual labels:  engine, unreal, ue4
Ue4 Tutorials
Collection of Unreal 4 Tutorials & Experiments.
Stars: ✭ 458 (+748.15%)
Mutual labels:  engine, unreal, ue4
LivePP
A UE4 plugin wrapper for Molecular Matter's Live++ Hot-Reloading Library
Stars: ✭ 105 (+94.44%)
Mutual labels:  engine, ue4, ue4-plugin
PsData
Flexible data model plugin for Unreal Engine 4
Stars: ✭ 34 (-37.04%)
Mutual labels:  ue4, ue4-plugin
iXn
Control your localization of apps
Stars: ✭ 20 (-62.96%)
Mutual labels:  internationalization, localization
locale-switcher
Browser Extension to quickly change your browser locale.
Stars: ✭ 75 (+38.89%)
Mutual labels:  internationalization, localization
ngx-translate-module-loader
Highly configurable and flexible translations loader for @ngx-translate/core
Stars: ✭ 31 (-42.59%)
Mutual labels:  internationalization, localization
sketch-crowdin
Connect your Sketch and Crowdin projects together
Stars: ✭ 35 (-35.19%)
Mutual labels:  internationalization, localization
typesafe-i18n
A fully type-safe and lightweight internationalization library for all your TypeScript and JavaScript projects.
Stars: ✭ 1,227 (+2172.22%)
Mutual labels:  internationalization, localization
docker-compose
Docker compose for Weblate
Stars: ✭ 62 (+14.81%)
Mutual labels:  internationalization, localization
Unreal-Binary-Builder
An application designed to create installed Unreal Engine builds (aka Rocket builds) from Unreal Engine GitHub source.
Stars: ✭ 554 (+925.93%)
Mutual labels:  unreal, ue4

BYG Localization

We wanted to support fan localization for Industries of Titan and found that Unreal's built-in localization system was not exactly what we wanted. So we made our own!

It differs from Unreal's localization system in a few ways:

  • Only support a single CSV file as the authoritative source for strings.
  • Support creation and maintenance of fan translations.
  • Fallback to primary language if text is missing in a fan translation.
  • Clearer errors when keys are missing in a stringtable.
  • Support multiple localizations for the same language.

Feature Comparison

Feature Unreal Localization BYG Localization
CSV stringtable support ✔️ ✔️
Add new keys in-editor ✔️
Reload text on CSV modification ✔️ ✔️
Support for fan translations ✔️
Show missing loc keys in-engine ✔️
Show fallback language text when keys are missing ✔️
Blueprint code support ✔️ ✔️
Multiple localizations for same language ✔️

Set-up

For this example, we will be using English as the Primary Language, but the system works with using any language as the Primary language.

1. Create CSV file

We are using English as the primary language for our game so we will create loc_en.csv inside /Content/Localization/, the default localization root directory for localization files.

Key,SourceString,Comment,English,Status
Hello_World,"Hello world, how are you?",General greeting.,,
Goodbye_World,"See you later!",Shown when quitting the game.,,,

2. Configure the plugin

Open Project Settings > Plugins > BYG Localization and set the following:

  • Primary Localization Directory should point to where you saved the csv file.
  • Most other defaults should be OK.

Open Window > Developer Tools > BYG Localization Stats, and hit Refresh All. Your csv file should be listed there.

Stats window example

Usage

Using Localized Text in Blueprints

After adding the keys to the Stringtable CSV file, choose the entries for all FText properties by:

  1. Click on the drop-down arrow.
  2. Choose the Stringtable ID. BYG Localization defaults to "Game".
  3. Choose the key

Animation showing process for choosing a string entry

In Blueprint graphs, use GetGameText in BYGLocalizationStatics.

Getting Localized Text in C++

FText ButtonLabelText = UBYGLocalizationStatics::GetGameText( "Hello_World" );

Changing the active locale

FString PathToCSV;
UBYGLocalizationStatics::SetActiveLocalization( PathToCSV );

Stats Window

There is an stats window available in the editor for seeing which localization files have been detected by the system, how many entries they have, the status of those entries etc.

Access it through Window > Developer Tools > BYG Localization Stats.

Stats window example

Customizing Settings

All of the project settings can be modified through Project Settings > Plugins > BYG Localization in the editor, or through Config/DefaultBYGLocalization.ini

Settings include:

  • Localization file directories (default /Localization/)
  • Allowed filetypes (default .csv and .txt)
  • Filename prefix/suffix (default loc_ prefix, no suffix)
  • Forcing quotation marks around all CSV values.

User Experience for Fan Localizers

Creating a new localization

  1. Create a file with the two-character ISO 639-1 language code and optional region suffix. e.g. if the primary file is loc_en.csv and you want to translate the game into French, create a file called loc_fr.csv
  2. Launch the game with the -UpdateLoc flag (create a desktop shortcut).
  3. Your loc_fr.csv file is now populated with all of the primary language strings.

After creating loc_fr.csv and running the game, your CSV file will look like this:

Key SourceString Comment Primary Status
NewGameButtonLabel New Game On main menu, starts new game New Game New Entry
ExitGameButtonLabel Quit Exits the program Quit New Entry

After translation, your CSV file should look like this. You can remove the "New Entry" text from the Status column:

Key SourceString Comment Primary Status
NewGameButtonLabel Nouvelle partie On main menu, starts new game. New Game (blank)
ExitGameButtonLabel Quitter Exits the program. Quit (blank)

Maintaining a localization

As the game is updated, strings will be added, removed or modified.

  • New strings will be shown with the status "New Entry", and will show up in the Primary Language until they are translated.
  • Modified will be shown with the status "Modified" and what the primary language text was before.
  • Removed strings will be shown with the status "Deprecated", or automatically removed (depending on the project settings).
Key SourceString Comment Primary Status
NewGameButtonLabel Nouvelle partie On main menu, starts new game. New Game (blank)
ExitGameButtonLabel Quitter On main menu, starts new game. Quit game Modified: Was 'Quit'
LoadGameButtonLabel Load Game Shows the load game screen. Load Game New Entry

Installation

Source

  1. Download the zip or clone the repository to ProjectName/Plugins/BYGLocalization.
  2. Add BYGLocalization to PrivateDependencyModuleNames inside ProjectName.Build.cs.

Unreal Version Support

  • Compiles under Unreal Engine 4.22 up to 5.0EA
  • Tested mostly with 4.25 and 4.26

License

Contact

Future Work

  • Detecting runaway misquoted strings.
  • Allowing multiple stringtables, e.g. loc_en_ui.csv, loc_en_dialog.csv.
  • More tests!
  • Profiling and performance improvements.
  • Improve dir picker, see DirectoryPathStructCustomization
  • Add "Export Changes" function for exporting New and Modified entries for all seelcted languages.

How it works

The plugin uses Project Settings to search for localization files in the specified directories. It uses Unreal's String Table system to register both the primary language (e.g. English) and the user's preferred language (e.g. French).

Fallback works in two ways:

  1. If text is set with UBYGLocalizationStatics::GetText(const FString& KeyName) and the key is not found, the key is then looked up in the fallback table.

  2. When running the game, all localization files are parsed and any missing keys are added to non-primary localization files. This way FText properties inside Blueprints will still find keys in the Stringtable for the user's selected locale.

FAQ

Q) I changed Stringtable Namespace and/or Stringtable ID and now my text is gone!

A) Changing Namespace or Stringtable ID will break all of the FText strings in your Blueprints. You should only set these values once at the start of the project, and not change them.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].