C# Class NGettext.Loaders.MoLoader

A catalog loader that loads data from files in the GNU/Gettext MO file format.
Inheritance: ILoader
Afficher le fichier Open project: neris/NGettext

Méthodes publiques

Méthode Description
Load ( Catalog catalog ) : void

Loads translations to the specified catalog using catalog's culture info.

MoLoader ( Stream moStream ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.

MoLoader ( Stream moStream, IPluralRuleGenerator pluralRuleGenerator ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.

MoLoader ( Stream moStream, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.

MoLoader ( Stream moStream, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.

MoLoader ( string filePath ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.

MoLoader ( string filePath, IPluralRuleGenerator pluralRuleGenerator ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.

MoLoader ( string filePath, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.

MoLoader ( string filePath, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.

MoLoader ( string domain, string localeDir ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.

MoLoader ( string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.

MoLoader ( string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.

MoLoader ( string domain, string localeDir, MoFileParser parser ) : System

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.

Méthodes protégées

Méthode Description
FindTranslationFile ( CultureInfo cultureInfo, string domain, string localeDir ) : string

Finds corresponding translation file using specified culture info, domain and a locale directory.

GetFileName ( string localeDir, string domain, string locale ) : string

Constructs a standard path to the MO translation file using specified path to the locale directory, domain and locale's TwoLetterISOLanguageName string.

Load ( MoFile parsedMoFile, Catalog catalog ) : void

Loads translations to the specified catalog using specified MO file parser.

Load ( Stream moStream, Catalog catalog ) : void

Loads translations to the specified catalog from specified MO file stream.

Load ( string filePath, Catalog catalog ) : void

Loads translations to the specified catalog from specified MO file path.

Load ( string domain, string localeDir, Catalog catalog ) : void

Loads translations to the specified catalog using catalog's culture info from specified locale directory and specified domain.

Method Details

FindTranslationFile() protected méthode

Finds corresponding translation file using specified culture info, domain and a locale directory.
protected FindTranslationFile ( CultureInfo cultureInfo, string domain, string localeDir ) : string
cultureInfo System.Globalization.CultureInfo
domain string
localeDir string
Résultat string

GetFileName() protected méthode

Constructs a standard path to the MO translation file using specified path to the locale directory, domain and locale's TwoLetterISOLanguageName string.
protected GetFileName ( string localeDir, string domain, string locale ) : string
localeDir string
domain string
locale string
Résultat string

Load() public méthode

Loads translations to the specified catalog using catalog's culture info.
public Load ( Catalog catalog ) : void
catalog Catalog A catalog instance to load translations to.
Résultat void

Load() protected méthode

Loads translations to the specified catalog using specified MO file parser.
protected Load ( MoFile parsedMoFile, Catalog catalog ) : void
parsedMoFile MoFile
catalog Catalog
Résultat void

Load() protected méthode

Loads translations to the specified catalog from specified MO file stream.
protected Load ( Stream moStream, Catalog catalog ) : void
moStream Stream
catalog Catalog
Résultat void

Load() protected méthode

Loads translations to the specified catalog from specified MO file path.
protected Load ( string filePath, Catalog catalog ) : void
filePath string
catalog Catalog
Résultat void

Load() protected méthode

Loads translations to the specified catalog using catalog's culture info from specified locale directory and specified domain.
protected Load ( string domain, string localeDir, Catalog catalog ) : void
domain string
localeDir string
catalog Catalog
Résultat void

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.
public MoLoader ( Stream moStream ) : System
moStream Stream
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.
public MoLoader ( Stream moStream, IPluralRuleGenerator pluralRuleGenerator ) : System
moStream Stream
pluralRuleGenerator IPluralRuleGenerator
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.
public MoLoader ( Stream moStream, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System
moStream Stream
pluralRuleGenerator IPluralRuleGenerator
parser MoFileParser
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified stream.
public MoLoader ( Stream moStream, MoFileParser parser ) : System
moStream Stream
parser MoFileParser
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.
public MoLoader ( string filePath ) : System
filePath string
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.
public MoLoader ( string filePath, IPluralRuleGenerator pluralRuleGenerator ) : System
filePath string
pluralRuleGenerator IPluralRuleGenerator
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.
public MoLoader ( string filePath, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System
filePath string
pluralRuleGenerator IPluralRuleGenerator
parser MoFileParser
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file from the specified path.
public MoLoader ( string filePath, MoFileParser parser ) : System
filePath string
parser MoFileParser
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.
public MoLoader ( string domain, string localeDir ) : System
domain string
localeDir string
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.
public MoLoader ( string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator ) : System
domain string
localeDir string
pluralRuleGenerator IPluralRuleGenerator
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.
public MoLoader ( string domain, string localeDir, IPluralRuleGenerator pluralRuleGenerator, MoFileParser parser ) : System
domain string
localeDir string
pluralRuleGenerator IPluralRuleGenerator
parser MoFileParser
Résultat System

MoLoader() public méthode

Initializes a new instance of the MoLoader class which will try to load a MO file that will be located in the localeDir using the domain name and catalog's culture info.
public MoLoader ( string domain, string localeDir, MoFileParser parser ) : System
domain string
localeDir string
parser MoFileParser
Résultat System