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, AppCaches, DirectoryInfo)
Declaration
public LocalizedTextServiceFileSources(ILogger logger, AppCaches appCaches, DirectoryInfo fileSourceFolder)
Parameters
Type |
Name |
Description |
ILogger |
logger |
|
AppCaches |
appCaches |
|
System.IO.DirectoryInfo |
fileSourceFolder |
|
View Source
LocalizedTextServiceFileSources(ILogger, AppCaches, DirectoryInfo, IEnumerable<LocalizedTextServiceSupplementaryFileSource>)
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 logger, AppCaches appCaches, DirectoryInfo fileSourceFolder, IEnumerable<LocalizedTextServiceSupplementaryFileSource> supplementFileSources)
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 |
System.Collections.Generic.IDictionary<System.Globalization.CultureInfo, System.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> |
|