Assembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
The main use for the EPLang property is to translate EPiServer strings into the current language. EPLang is an instantce of LanguageManager, which has a property, Directory, and a few methods. It is the Translate method that is primarily used.By default, EPiServer will monitor the BaseDirectory + "/lang" directory for language files.
Translate has two overloaded variants. The first one is used in the first two code examples below. It takes a string argument, key, in a simplified XML XPath form and returns the proper language string. The key is typically something like "/admin/settings/heading", where the expression closely follows the folder/ file/ usage pattern. You can also enter "#" to automatically construct a path to the current file. For example, calling the Translate method in the file /templates/mypage.aspx with the key set to '#heading', Translate( "#heading" ) is equivalent to Translate( "/templates/mypage/heading").
The second form of Translate takes two string arguments, the first again being a key used in the same way as earlier, and the second argument being a language identifier.