View Source
Class LocalizedTextServiceFileSources
Exposes the XDocument sources from files for the default localization text service and ensure caching is taken care
of
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public class LocalizedTextServiceFileSources
Constructors
View Source
LocalizedTextServiceFileSources(ILogger<LocalizedTextServiceFileSources>, AppCaches, DirectoryInfo)
Declaration
public LocalizedTextServiceFileSources(ILogger<LocalizedTextServiceFileSources> logger, AppCaches appCaches, DirectoryInfo fileSourceFolder)
Parameters
View Source
LocalizedTextServiceFileSources(ILogger<LocalizedTextServiceFileSources>, AppCaches, DirectoryInfo, IEnumerable<LocalizedTextServiceSupplementaryFileSource>, IDirectoryContents)
This is used to configure the file sources with the main file sources shipped with Umbraco and also including
supplemental/plugin based
localization files. The supplemental files will be loaded in and merged in after the primary files.
The supplemental files must be named with the 4 letter culture name with a hyphen such as : en-AU.xml
Declaration
public LocalizedTextServiceFileSources(ILogger<LocalizedTextServiceFileSources> logger, AppCaches appCaches, DirectoryInfo fileSourceFolder, IEnumerable<LocalizedTextServiceSupplementaryFileSource> supplementFileSources, IDirectoryContents directoryContents)
Parameters
Methods
View Source
GetXmlSources()
Returns all xml sources for all culture files found in the folder.
Declaration
public IDictionary<CultureInfo, Lazy<XDocument>> GetXmlSources()
Returns
Type |
Description |
IDictionary<System.Globalization.CultureInfo, Lazy<System.Xml.Linq.XDocument>> |
|
View Source
TryConvert2LetterCultureTo4Letter(String)
Declaration
public Attempt<CultureInfo> TryConvert2LetterCultureTo4Letter(string twoLetterCulture)
Parameters
Type |
Name |
Description |
System.String |
twoLetterCulture |
|
Returns
Type |
Description |
Attempt<System.Globalization.CultureInfo> |
|
View Source
TryConvert4LetterCultureTo2Letter(CultureInfo)
Declaration
public Attempt<string> TryConvert4LetterCultureTo2Letter(CultureInfo culture)
Parameters
Type |
Name |
Description |
System.Globalization.CultureInfo |
culture |
|
Returns
Type |
Description |
Attempt<System.String> |
|