C# Class GarrysModLuaShared.language

The language library is used for translation.
ファイルを表示 Open project: OmegaExtern/gmod-csharp-binary-module

Public Methods

Method Description
Add ( LuaState luaState, string placeholder, string fullText ) : void

Adds a language item. Language placeholders are replaced with full text in Garry's Mod once registered with this function.

GetPhrase ( LuaState luaState, string phrase ) : string

Retrieves the translated version of inputted string. Useful for concentrating multiple translated strings.

Method Details

Add() public static method

Adds a language item. Language placeholders are replaced with full text in Garry's Mod once registered with this function.
public static Add ( LuaState luaState, string placeholder, string fullText ) : void
luaState LuaState Pointer to lua_State struct.
placeholder string The key for this phrase.
fullText string The phrase that should be displayed whenever this key is used.
return void

GetPhrase() public static method

Retrieves the translated version of inputted string. Useful for concentrating multiple translated strings.
public static GetPhrase ( LuaState luaState, string phrase ) : string
luaState LuaState Pointer to lua_State struct.
phrase string The untranslated phrase.
return string