ILang interface

Ashley's avatar
Construct Team Founder
Published 8 Jan, 2018
138 words
<1 min

The ILang interface allows for looking up translated strings in the language file.



Push a prefix to the context stack. For example PushContext("foo") followed by Get(".bar") will return the same string as if Get("") were used. Pushing a context beginning with a dot will append to the current prefix, but pushing an entry not beginning with a dot will reset the current prefix. Note: be sure to always call PopContext() afterwards.


Pop a prefix from the context stack.


Look up a string in the language file. If the context begins with a dot, it is relative to the current context prefix. Otherwise it is treated as an absolute context.