function GetLocaleFile(const FileName: string): string;
extern DELPHI_PACKAGE System::UnicodeString __fastcall GetLocaleFile(const System::UnicodeString FileName);
Returns a fully qualified path that indicates a locale file. The path is constructed with the supplied filename and the preferred UI language subdirectories.
GetLocaleFile performs the following operations:
- The directory and the basename are extracted from the FileName parameter.
- The locale directory that corresponds to any of the preferred UI languages is searched in directory. If such a directory is found, then its fully qualified name concatenated with basename is returned, otherwise the fully qualified name of the FileName parameter is returned.
Suppose that the current directory contains a directory named loc with the following structure:
- ab [directory]
- en [directory]
- en-US [directory]
- F.LC [file]
- ro [directory]
and the current preferred UI language list (see PreferredUILanguageList) contains:
In this case, if GetLocaleFile is called with the loc\F.LC parameter, the following string is returned:
You can see that the returned string contains the