C# Класс Open.Core.Common.LocalizationExtensions

Extensions for performing localization on strings.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetStringLibrary ( this assembly ) : ResourceManager

Gets the 'StringLibrary' resource for the given assembly.

This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.

ToLocalString ( this key ) : string

Converts the given key to it's localized form.

This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.

ToLocalString ( this key, Assembly assembly ) : string

Converts the given key to it's localized form.

This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.

Приватные методы

Метод Описание
GetLocalStringValue ( string key, Assembly assembly ) : string

Описание методов

GetStringLibrary() публичный статический Метод

Gets the 'StringLibrary' resource for the given assembly.
This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.
public static GetStringLibrary ( this assembly ) : ResourceManager
assembly this The assembly containing the resource.
Результат System.Resources.ResourceManager

ToLocalString() публичный статический Метод

Converts the given key to it's localized form.
This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.
public static ToLocalString ( this key ) : string
key this The key to lookup in the asset library.
Результат string

ToLocalString() публичный статический Метод

Converts the given key to it's localized form.
This method assumes that the resource file is named 'StringLibrary.resx' (or standard regional variant, such as 'StringLibrary.de.resx' or 'StringLibrary.de-DE.resx') and placed within the project.
This can be placed anywhere within the project, but only one file with this name should be present.
public static ToLocalString ( this key, Assembly assembly ) : string
key this The key to lookup in the asset library.
assembly System.Reflection.Assembly The assembly to use as a content lookup.
Результат string