The entry point to localize any key in the text storage source for a given culture
InheritanceSystem.Object
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic class LocalizedTextService : ILocalizedTextService
Constructors View Source LocalizedTextService(IDictionary<CultureInfo, Lazy<IDictionary<String, IDictionary<String, String>>>>, ILogger<LocalizedTextService>)
Initializes with a source of a dictionary of culture -> areas -> sub dictionary of keys/values
Declarationpublic LocalizedTextService(IDictionary<CultureInfo, Lazy<IDictionary<string, IDictionary<string, string>>>> source, ILogger<LocalizedTextService> logger)
Parameters Type Name Description IDictionary<System.Globalization.CultureInfo, Lazy<IDictionary<System.String, IDictionary<System.String, System.String>>>> source ILogger<LocalizedTextService> logger View Source LocalizedTextService(IDictionary<CultureInfo, Lazy<XDocument>>, ILogger<LocalizedTextService>)
Initializes with an XML source
Declarationpublic LocalizedTextService(IDictionary<CultureInfo, Lazy<XDocument>> source, ILogger<LocalizedTextService> logger)
Parameters Type Name Description IDictionary<System.Globalization.CultureInfo, Lazy<System.Xml.Linq.XDocument>> source ILogger<LocalizedTextService> logger View Source LocalizedTextService(Lazy<LocalizedTextServiceFileSources>, ILogger<LocalizedTextService>)
Initializes with a file sources instance
Declarationpublic LocalizedTextService(Lazy<LocalizedTextServiceFileSources> fileSources, ILogger<LocalizedTextService> logger)
Parameters Methods View Source ConvertToSupportedCultureWithRegionCode(CultureInfo)
Tries to resolve a full 4 letter culture from a 2 letter culture name
Declarationpublic CultureInfo ConvertToSupportedCultureWithRegionCode(CultureInfo currentCulture)
Parameters Type Name Description System.Globalization.CultureInfo currentCulture
The culture to determine if it is only a 2 letter culture, if so we'll try to convert it, otherwise it will just be returned
Returns Type Description System.Globalization.CultureInfo View Source GetAllStoredValues(CultureInfo)Returns all key/values in storage for the given culture
Declarationpublic IDictionary<string, string> GetAllStoredValues(CultureInfo culture)
Parameters Type Name Description System.Globalization.CultureInfo culture Returns Type Description IDictionary<System.String, System.String> View Source GetAllStoredValuesByAreaAndAlias(CultureInfo)
Returns all key/values in storage for the given culture
Declarationpublic IDictionary<string, IDictionary<string, string>> GetAllStoredValuesByAreaAndAlias(CultureInfo culture)
Parameters Type Name Description System.Globalization.CultureInfo culture Returns Type Description IDictionary<System.String, IDictionary<System.String, System.String>> View Source GetSupportedCultures()
Returns a list of all currently supported cultures
Declarationpublic IEnumerable<CultureInfo> GetSupportedCultures()
Returns Type Description IEnumerable<System.Globalization.CultureInfo> View Source Localize(String, CultureInfo, Nullable<IDictionary<String, String>>) Declaration
public string Localize(string key, CultureInfo culture, IDictionary<string, string>? tokens = null)
Parameters Type Name Description System.String key System.Globalization.CultureInfo culture System.Nullable<IDictionary<System.String, System.String>> tokens Returns Type Description System.String View Source Localize(String, String, CultureInfo, Nullable<IDictionary<String, String>>) Declaration
public string Localize(string area, string alias, CultureInfo culture, IDictionary<string, string>? tokens = null)
Parameters Type Name Description System.String area System.String alias System.Globalization.CultureInfo culture System.Nullable<IDictionary<System.String, System.String>> tokens Returns Type Description System.String
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4