Please note that it will overrwrite any existing resource files if they already exist, so please use this class with care if you have existing ResX resources.
Note this class is primarily ASP.NET specific in that it looks at ASP.NET specific directory structures for ResX imports and strongly typed resource creation.
public class DbResXConverter : object
Member | Description | |
---|---|---|
Constructor | Creates new instance with the default Web Application base path set to the current Web application's path. | |
ResXDocumentTemplate | ||
FormatResourceSetPath | Returns the path the resource file withouth the resx and localeId extension public string FormatResourceSetPath(string ResourceSet);
|
|
FormatWebResourceSetPath | Translates the resource set path ASP.NET WebForms Global or local resource path base (ie. without the .resx and localeId extension). public string FormatWebResourceSetPath(string ResourceSet,
bool LocalResources); |
|
GenerateGlobalWebResourceResXFiles | Genereates Local Web Resource ResX files from the DbResourceDataManager public bool GenerateGlobalWebResourceResXFiles();
|
|
GenerateLocalWebResourceResXFiles | Genereates Local Web Resource ResX files from the DbResourceDataManager public bool GenerateLocalWebResourceResXFiles();
|
|
GenerateResXFiles | Generates Resx Files for standard non-Web Resource files based on the BasePhysicalPath public bool GenerateResXFiles();
|
|
GetResXResourcesNormalizedForLocale | Returns all resources for a given locale normalized down the hierarchy for a given resource file. The resource file should be specified without the .resx and locale identifier extensions. public Dictionary<String,Object> GetResXResourcesNormalizedForLocale(string baseFile,
string LocaleId); |
|
ImportDirectoryResources | Imports all resources from a given directory. This method works for any resources. public bool ImportDirectoryResources(string path,
string relativePath); |
|
ImportResourceFile | Imports an individual ResX Resource file into the database public bool ImportResourceFile(string FileName,
string ResourceSetName, string LocaleId); |
|
ImportWebResources | Imports ResX Web Resources of a Web application by parsing through the App_GlobalResources and App_LocalResources directories of a Web site. public bool ImportWebResources();
|
|
ImportWinResources | Imports Resources recursively from a non-Web project public bool ImportWinResources(string basePhysicalPath,
string baseNamespace); |
|
BasePhysicalPath | The physical path of the Web application. This path serves as the root path to write resources to. | |
ErrorMessage | Error message if an operation fails |