-
Notifications
You must be signed in to change notification settings - Fork 0
GLocale
Default language library is a library in gmod that for some ungodly reason is only accessible on client and has a terrible API. GLocale was made to be perfect for localisation as it offers support for loading multiple language translations at the same time, combined literal and translation strings in localised string, and loading translations from .properties file from anywhere.
- ID:
locale - Accessed with:
thorium.glocale

GLocale.Add(placeholder: string, fulltext: string, lang: string|nil)
Add a translation string manually

GLocale.LoadFromFile(filepath: string, gamepath: string, lang: string|nil)
Load translation strings from properties file

GLocale.Localize(text: string, lang: string|nil) -> localized: string
Localize string. In string text, parts starting with "#" will be replaced with appropriate translation strings