Метод | Описание | |
---|---|---|
GetAvailableLanguages ( ) : IEnumerable |
Checks in first hand settings file, if not found there it checks file structure
|
|
GetCacheDependencyForAllLanguages ( ) : System.Web.Caching.CacheDependency | ||
GetCacheDependencyForSingleLanguage ( string langtag ) : System.Web.Caching.CacheDependency | ||
GetTranslation ( string langtag, List |
||
POTranslationRepository ( |
||
SaveTemplate ( TemplateItem>.IDictionary |
Saves a template file which is a all strings (needing translation) used in the entire project. Not language dependent
|
|
SaveTranslation ( |
Saves a translation into file with standard pattern locale/langtag/message.po Also saves a backup of previous version
|
|
TranslationExists ( string langtag ) : bool |
Checks if the language is set as supported in config file If not it checks if the PO file is available
|
Метод | Описание | |
---|---|---|
GetAbsoluteLocaleDir ( ) : string |
Gets the locale directory from settings and makes sure it is translated into absolut path
|
|
GetPathForLanguage ( string langtag, string filename = null ) : string | ||
ParseBody ( TextReader fs, string line, IEnumerable |
Parses the body of a PO file item. That is to say the message id and the message itself. Reason for why it must be on second line (textreader) is so that you can read until you have read to far without peek previously for meta data.
|
|
ParseTranslationFile ( string langtag, List |
Parses a PO file into a Language object
|
|
RemoveCommentIfHistorical ( string line ) : string |
Removes the preceding characters in a file showing that an item is historical/log. That is to say it has been removed from the project. We don't need care about the character as the fact that it lacks references is what tells us it's a log item
|
|
SaveTemplate ( TemplateItem>.IDictionary |
||
Unescape ( string s ) : string |
Looks up in the subject string standard C escape sequences and converts them to their actual character counterparts.
|
|
Unquote ( string lhs, string quotechar = "\"" ) : string | ||
WriteString ( |
Helper for writing either a msgid or msgstr to the po file.
|
|
escape ( string s ) : string |
public GetAvailableLanguages ( ) : IEnumerable |
||
Результат | IEnumerable |
public GetCacheDependencyForAllLanguages ( ) : System.Web.Caching.CacheDependency | ||
Результат | System.Web.Caching.CacheDependency |
public GetCacheDependencyForSingleLanguage ( string langtag ) : System.Web.Caching.CacheDependency | ||
langtag | string | |
Результат | System.Web.Caching.CacheDependency |
public GetTranslation ( string langtag, List |
||
langtag | string | |
fileNames | List |
|
loadingCache | bool | |
Результат |
public POTranslationRepository ( |
||
settings | ||
Результат | System |
public SaveTemplate ( TemplateItem>.IDictionary |
||
items | TemplateItem>.IDictionary | A list of template items to save. The list should be all template items for the entire project. |
Результат | void |
public SaveTranslation ( |
||
translation | The translation you wish to save. Must have Language shortag filled out. | |
Результат | void |
public TranslationExists ( string langtag ) : bool | ||
langtag | string | The tag for which you want to check if support exists. For instance "sv-SE" |
Результат | bool |