Many applications need quite complex language handling with unique names for languages, files which need checking, other validation and similar things. These two sections are designed to aid you to do this. They take input from the developer and manipulate values in the way specified to produce the environment variable %PAL:LanguageCustom% in the end which can be used in any values in the rest of the file marked “Environment variable substitions apply.”.
Details on how this is constructed are available in the document Setting a custom language environment variable.
The base string upon which languages are based. This should contain (and probably be) one of the language environment variables.
If the base value is not found in the [LanguageStrings] section, it will be set to this value. If this value is not set it will fall back to the base value.
Check if this file exists. To check for a directory add \*.* to the end. If the file does not exist it will fall back to the DefaultIfNotExists value.
Values in the [Language]:Base will be looked up here by key name and the values returned after environment variable parsing.
For reading the custom language variable from a file for when the portable application is not launched from the PortableApps.com Platform. The values which must be set depend on the Type specified below.
Specify the type of file reading which is to be used:
Both ConfigRead and INI are Unicode-compatible. The encoding (ANSI, UTF-8 or UTF-16LE) will be detected automatically from the file’s BOM.
Changed in version 2.1: previously ConfigRead was not able to read from UTF-16LE files.
Specify the file which will the value will be read from.
The value will be written to a line starting with this value. This should be set to the text to search for at the start of a line. In an INI-style file, this would be key=, and in an XML file it might be ' <config id="something">'; note that you must include any leading whitespace which will be in the file, and if there is any leading or trailing whitespace you must quote the string with single (') or double (") quotes.
If you need to cut something off the end such as a quotation mark or a closing XML tag, see [LanguageFile]:TrimRight.
The attribute to read the value from. See Dealing with XML data for more details.
Specify the XPath to find the place to read from. It is a good idea to make sure that you have a solid understanding of how XPaths work and how to use them before writing one.
For information about what this should look like, see Dealing with XML data.
Case sensitive searches are somewhat faster than case-insensitive searches. If you can do a case-sensitive ConfigRead, do.
If you need to remove something from the right of a line which you have read, for example if you want to get rid of a file extension, a quotation mark, a closing XML tag or similar, put the text in here and if it is at the end of the string it will be removed. Remember the rule about whitespace and quotation marks.
Enter search terms or a module, class or function name.