Bloom.BloomFileLocator.GetBestLocalizableFileDistributedWithApplication C# (CSharp) Method

GetBestLocalizableFileDistributedWithApplication() public static method

This can be used to find the best localized file when there is only one file with the given name, and the file is part of the files distributed with Bloom (i.e., not something in a downloaded template).
public static GetBestLocalizableFileDistributedWithApplication ( bool existenceOfEnglishVersionIsOptional ) : string
existenceOfEnglishVersionIsOptional bool
return string
        public static string GetBestLocalizableFileDistributedWithApplication(bool existenceOfEnglishVersionIsOptional, params string[] partsOfEnglishFilePath)
        {
            var englishPath = FileLocator.GetFileDistributedWithApplication(existenceOfEnglishVersionIsOptional, partsOfEnglishFilePath);
            if(!RobustFile.Exists(englishPath))
            {
                return englishPath; // just return whatever the original GetFileDistributedWithApplication gave. "", null, whatever it is.
            }
            return BloomFileLocator.GetBestLocalizedFile(englishPath);
        }