Class: LanguageHandler
- Inherits:
-
Object
- Object
- LanguageHandler
Overview
Language string table. Implemented in app/resources/Tools/modraup_langhandler.rb, where langhandler.rb is the compatibility entry point and is required when the host starts. It reads the .strings file by locale; if the file or entry is missing, #GetString / #[] falls back to the key.
Class Method Summary # collapse
Instance Method Summary # collapse
-
#GetString(key) ⇒ String
Return the key itself (copy) when the table or key is missing.
-
#[] ⇒ String
Alias for #GetString.
-
#GetStrings ⇒ Hash
The loaded translation table. Returns an empty Hash when .strings is missing; defaults to returning the key when a key is missing.
Class Method Details
LanguageHandler.new(strings_file) ⇒ LanguageHandler
Instance Method Details
handler.GetString(key) ⇒ String
Return the key itself (copy) when the table or key is missing.
handler[key] ⇒ String
Alias for #GetString.
handler.GetStrings ⇒ Hash
The loaded translation table. Returns an empty Hash when .strings is missing; defaults to returning the key when a key is missing.