C# Class Serenity.Localization.FallbackLocalTextRegistry

Adds key fallback to any ILocalTextRegistry implementation
Inheritance: ILocalTextRegistry
Exibir arquivo Open project: volkanceylan/Serenity

Public Methods

Method Description
Add ( string languageID, string key, string text ) : void

Adds a local text entry to the registry

BreakUpString ( string value ) : string

Break up string without spaces (e.g. LastDirectoryUpdate) into a normal string (e.g. 'Last Directory Update')

FallbackLocalTextRegistry ( ILocalTextRegistry localTextRegistry ) : Serenity.Abstractions
TryGet ( string languageID, string key ) : string

Returns localized representation which corresponds to the local text key or the fallback if none found in the registry.

TryGetKeyFallback ( string key ) : string

Get a fallback of the local text key

Method Details

Add() public method

Adds a local text entry to the registry
public Add ( string languageID, string key, string text ) : void
languageID string Language ID (e.g. en-US, tr-TR)
key string Local text key
text string Translated text
return void

BreakUpString() public static method

Break up string without spaces (e.g. LastDirectoryUpdate) into a normal string (e.g. 'Last Directory Update')
public static BreakUpString ( string value ) : string
value string
return string

FallbackLocalTextRegistry() public method

public FallbackLocalTextRegistry ( ILocalTextRegistry localTextRegistry ) : Serenity.Abstractions
localTextRegistry ILocalTextRegistry
return Serenity.Abstractions

TryGet() public method

Returns localized representation which corresponds to the local text key or the fallback if none found in the registry.
public TryGet ( string languageID, string key ) : string
languageID string Language identifier
key string Local text key (e.g. Enums.Month.June)
return string

TryGetKeyFallback() public static method

Get a fallback of the local text key
public static TryGetKeyFallback ( string key ) : string
key string Local text key
return string