메소드 | 설명 | |
---|---|---|
AddResource ( Westwind.Globalization.ResourceItem resource ) : int |
Adds a resource to the Localization Table
|
|
AddResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int |
Adds a resource to the Localization Table
|
|
CreateBackupTable ( string BackupTableName ) : bool |
Create a backup of the localization database. Note the table used is the one specified in the Configuration.ResourceTableName
|
|
CreateDbResourceDataManager ( DbResourceProviderTypes type ) : |
Create an instance of the provider based on the resource type
|
|
CreateDbResourceDataManager ( |
Creates an instance of the DbResourceDataManager based on configuration settings
|
|
CreateLocalizationTable ( string tableName = null ) : bool |
Creates the Localization table on the current connection string for the provider.
|
|
DeleteResource ( string resourceId, string resourceSet = null, string cultureName = null ) : bool |
Deletes a specific resource ID based on ResourceId, ResourceSet and Culture. If an empty culture is passed the entire group is removed (ie. all locales).
|
|
DeleteResourceSet ( string ResourceSet, string cultureName = null ) : bool |
Deletes an entire resource set from the database. Careful with this function!
|
|
GenerateResources ( IDictionary resourceList, string cultureName, string resourceSet, bool deleteAllResourceFirst ) : bool |
Persists resources to the database - first wipes out all resources, then writes them back in from the ResourceSet
|
|
GetAllLocaleIds ( string resourceSet ) : List |
Gets all the locales for a specific resource set. Returns a table named TLocaleIds (LocaleId field)
|
|
GetAllLocalesForResourceSet ( string resourceSet ) : List |
||
GetAllResourceIdListItems ( string resourceSet ) : List |
Returns a list with ResourceId and HasValues fields where the ResourceId is formatted for HTML display.
|
|
GetAllResourceIds ( string resourceSet ) : List |
Returns all available resource ids for a given resource set in all languages. Returns a ResourceIdItem object with ResourecId and HasValue fields. HasValue returns whether there are any entries in any culture for this resourceId
|
|
GetAllResourceSets ( ResourceListingTypes type ) : List |
Returns all available resource sets
|
|
GetAllResources ( bool localResources = false, bool applyValueConverters = false, string resourceSet = null ) : List |
Returns a list of all the resources for all locales. The result is in a table called TResources that contains all fields of the table. The table is ordered by LocaleId. This version returns either local or global resources in a Web app Fields: ResourceId,Value,LocaleId,ResourceSet,Type
|
|
GetAllResourcesForCulture ( string resourceSet, string cultureName ) : List |
Gets all the Resourecs and ResourceIds for a given resource set and Locale returns a table "TResource" ResourceId, Value fields
|
|
GetDb ( string connectionString = null ) : DataAccessBase |
Creates an instance of the DataAccess Data provider
|
|
GetFileInfo ( string fileName, bool noPhysicalFile = false ) : |
Internal routine that looks at a file and based on its extension determines how that file needs to be stored in the database. Returns FileInfoFormat structure
|
|
GetResourceItem ( string resourceId, string resourceSet, string cultureName ) : Westwind.Globalization.ResourceItem |
Returns a resource item that returns both the Value and Comment to the fields to the client.
|
|
GetResourceItems ( string resourceId, string resourceSet, bool forAllResourceSetLocales = false ) : IEnumerable |
Returns all resource items for a given resource ID in all locales. Returned as full ResourceItem objects
|
|
GetResourceObject ( string resourceId, string resourceSet, string cultureName ) : object |
Returns an object from the Resources. Attempts to convert the object to its original type. Use this for any non-string types. Useful for binary resources like images, icons etc. While this method can be used with strings, GetResourceString() is much more efficient.
|
|
GetResourceSet ( string cultureName, string resourceSet ) : IDictionary |
Returns a specific set of resources for a given culture and 'resource set' which in this case is just the virtual directory and culture.
|
|
GetResourceSetNormalizedForLocaleId ( string cultureName, string resourceSet ) : object>.Dictionary |
Returns a fully normalized list of resources that contains the most specific locale version for the culture provided. This means that this routine walks the resource hierarchy and returns the most specific value in this order: de-ch, de, invariant.
|
|
GetResourceString ( string resourceId, string resourceSet, string cultureName ) : string |
Returns an individual Resource String from the database
|
|
GetResourceStrings ( string resourceId, string resourceSet, bool forAllResourceSetLocales = false ) : string>.Dictionary |
Returns all the resource strings for all cultures for a specific resource Id. Returned as a dictionary.
|
|
GetResourcesAsJavascriptObject ( string javaScriptVarName, string resourceSet, string localeId ) : string |
Creates an global JavaScript object object that holds all non-control local string resources as property values. All resources are returned in normalized fashion from most specifc to more generic (de-ch,de,invariant depending on availability)
|
|
IsLocalizationTable ( string tableName = null ) : bool |
Checks to see if the LocalizationTable exists
|
|
IsValidCulture ( string IetfTag ) : bool |
Returns true or false depending on whether the two letter country code exists
|
|
RenameResource ( string ResourceId, string NewResourceId, string ResourceSet ) : bool |
Renames a given resource in a resource set. Note all languages will be renamed
|
|
RenameResourceProperty ( string Property, string NewProperty, string ResourceSet ) : bool |
Renames all property keys for a given property prefix. So this routine updates lblName.Text, lblName.ToolTip to lblName2.Text, lblName2.ToolTip if the property is changed from lblName to lblName2.
|
|
RenameResourceSet ( string OldResourceSet, string NewResourceSet ) : bool |
Renames a resource set. Useful if you need to move a local page resource set to a new page. ResourceSet naming for local resources is application relative page path: test.aspx subdir/test.aspx Global resources have a simple name
|
|
ResourceExists ( string ResourceId, string CultureName, string ResourceSet ) : bool |
Checks to see if a resource exists in the resource store
|
|
RestoreBackupTable ( string backupTableName ) : bool |
Restores the localization table from a backup table by first wiping out
|
|
SetError ( ) : void | ||
SetError ( |
||
SetError ( string message ) : void | ||
SetFileDataOnResourceItem ( Westwind.Globalization.ResourceItem item, byte data, string fileName ) : Westwind.Globalization.ResourceItem | ||
UpdateOrAddResource ( Westwind.Globalization.ResourceItem resource ) : int |
Updates a resource if it exists, if it doesn't one is created
|
|
UpdateOrAddResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int |
Updates a resource if it exists, if it doesn't one is created
|
|
UpdateResource ( Westwind.Globalization.ResourceItem resource ) : int |
Updates a resource if it exists, if it doesn't one is created
|
|
UpdateResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int |
Updates an existing resource in the Localization table
|
메소드 | 설명 | |
---|---|---|
DbResourceDataManager ( ) : System | ||
DeserializeValue ( string serializedValue, string resourceType ) : object |
Deserializes serialized data in JSON format based on a type name provided in the resource type parameter.
|
|
OnResourceSetValueConvert ( object &resourceValue, string key, int valueType ) : void | ||
SerializeValue ( object value ) : string |
Serializes a value to string that can be stored in data storage. Used for serializing arbitrary objects to store in the application
|
메소드 | 설명 | |
---|---|---|
LoadFileResource ( IDataReader reader ) : object |
Internal method used to parse the data in the database into a 'real' value. Value field hold filename and type string TextFile,BinFile hold the actual file content
|
public AddResource ( Westwind.Globalization.ResourceItem resource ) : int | ||
resource | Westwind.Globalization.ResourceItem | Resource to update |
리턴 | int |
public AddResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int | ||
resourceId | string | The resource key name |
value | object | Value to set it to. Can also be a file which is loaded as binary data when valueIsFileName is true |
cultureName | string | name of the culture or null for invariant/default |
resourceSet | string | The ResourceSet to which the resource id is added |
comment | string | Optional comment for the key |
valueIsFileName | bool | if true the Value property is a filename to import |
valueType | int | |
리턴 | int |
public CreateBackupTable ( string BackupTableName ) : bool | ||
BackupTableName | string | Table of the backup table. Null creates a _Backup table. |
리턴 | bool |
public static CreateDbResourceDataManager ( DbResourceProviderTypes type ) : |
||
type | DbResourceProviderTypes | |
리턴 |
public static CreateDbResourceDataManager ( |
||
managerType | ||
리턴 |
public CreateLocalizationTable ( string tableName = null ) : bool | ||
tableName | string | |
리턴 | bool |
public DeleteResource ( string resourceId, string resourceSet = null, string cultureName = null ) : bool | ||
resourceId | string | Resource Id to delete |
resourceSet | string | The resource set to remove |
cultureName | string | language ID - if empty all languages are deleted |
리턴 | bool |
public DeleteResourceSet ( string ResourceSet, string cultureName = null ) : bool | ||
ResourceSet | string | |
cultureName | string | |
리턴 | bool |
protected DeserializeValue ( string serializedValue, string resourceType ) : object | ||
serializedValue | string | JSON encoded string |
resourceType | string | Type name to deserialize - type must be referenced by the app |
리턴 | object |
public GenerateResources ( IDictionary resourceList, string cultureName, string resourceSet, bool deleteAllResourceFirst ) : bool | ||
resourceList | IDictionary | |
cultureName | string | |
resourceSet | string | |
deleteAllResourceFirst | bool | |
리턴 | bool |
public GetAllLocaleIds ( string resourceSet ) : List |
||
resourceSet | string | |
리턴 | List |
public GetAllLocalesForResourceSet ( string resourceSet ) : List |
||
resourceSet | string | |
리턴 | List |
public GetAllResourceIdListItems ( string resourceSet ) : List |
||
resourceSet | string | |
리턴 | List |
public GetAllResourceIds ( string resourceSet ) : List |
||
resourceSet | string | |
리턴 | List |
public GetAllResourceSets ( ResourceListingTypes type ) : List |
||
type | ResourceListingTypes | |
리턴 | List |
public GetAllResources ( bool localResources = false, bool applyValueConverters = false, string resourceSet = null ) : List |
||
localResources | bool | return local resources if true |
applyValueConverters | bool | |
resourceSet | string | |
리턴 | List |
public GetAllResourcesForCulture ( string resourceSet, string cultureName ) : List |
||
resourceSet | string | |
cultureName | string | |
리턴 | List |
public GetDb ( string connectionString = null ) : DataAccessBase | ||
connectionString | string | |
리턴 | DataAccessBase |
public static GetFileInfo ( string fileName, bool noPhysicalFile = false ) : |
||
fileName | string | |
noPhysicalFile | bool | |
리턴 |
public GetResourceItem ( string resourceId, string resourceSet, string cultureName ) : Westwind.Globalization.ResourceItem | ||
resourceId | string | The ID of the resource to retrieve |
resourceSet | string | Name of the ResourceSet to return |
cultureName | string | required. Null or Empty returns invariant |
리턴 | Westwind.Globalization.ResourceItem |
public GetResourceItems ( string resourceId, string resourceSet, bool forAllResourceSetLocales = false ) : IEnumerable |
||
resourceId | string | The resource Id to return for |
resourceSet | string | Resourceset to look in |
forAllResourceSetLocales | bool | When true returns empty entries for missing resources of locales in this resource set |
리턴 | IEnumerable |
public GetResourceObject ( string resourceId, string resourceSet, string cultureName ) : object | ||
resourceId | string | |
resourceSet | string | |
cultureName | string | required. Null or Empty culture returns invariant |
리턴 | object |
public GetResourceSet ( string cultureName, string resourceSet ) : IDictionary | ||
cultureName | string | name of the culture Id (de, de-de) to retrieve |
resourceSet | string | Name of the resource set to retrieve |
리턴 | IDictionary |
public GetResourceSetNormalizedForLocaleId ( string cultureName, string resourceSet ) : object>.Dictionary |
||
cultureName | string | |
resourceSet | string | |
리턴 | object>.Dictionary |
public GetResourceString ( string resourceId, string resourceSet, string cultureName ) : string | ||
resourceId | string | |
resourceSet | string | |
cultureName | string | |
리턴 | string |
public GetResourceStrings ( string resourceId, string resourceSet, bool forAllResourceSetLocales = false ) : string>.Dictionary |
||
resourceId | string | Resource Id to retrieve strings for |
resourceSet | string | Resource Set on which to retrieve strings |
forAllResourceSetLocales | bool | If true returns empty entries for each locale that exists but has no value in this resource set |
리턴 | string>.Dictionary |
public GetResourcesAsJavascriptObject ( string javaScriptVarName, string resourceSet, string localeId ) : string | ||
javaScriptVarName | string | Name of the JS object variable to createBackupTable |
resourceSet | string | ResourceSet name. Pass NULL for locale Resources |
localeId | string | |
리턴 | string |
public IsLocalizationTable ( string tableName = null ) : bool | ||
tableName | string | Table name or the configuration.ResourceTableName if not passed |
리턴 | bool |
public IsValidCulture ( string IetfTag ) : bool | ||
IetfTag | string | two or four letter IETF tag (examples: de, de-DE,fr,fr-CA) |
리턴 | bool |
protected OnResourceSetValueConvert ( object &resourceValue, string key, int valueType ) : void | ||
resourceValue | object | |
key | string | |
valueType | int | |
리턴 | void |
public RenameResource ( string ResourceId, string NewResourceId, string ResourceSet ) : bool | ||
ResourceId | string | |
NewResourceId | string | |
ResourceSet | string | |
리턴 | bool |
public RenameResourceProperty ( string Property, string NewProperty, string ResourceSet ) : bool | ||
Property | string | |
NewProperty | string | |
ResourceSet | string | |
리턴 | bool |
public RenameResourceSet ( string OldResourceSet, string NewResourceSet ) : bool | ||
OldResourceSet | string | Name of the existing resource set |
NewResourceSet | string | Name to set the resourceset name to |
리턴 | bool |
public ResourceExists ( string ResourceId, string CultureName, string ResourceSet ) : bool | ||
ResourceId | string | |
CultureName | string | |
ResourceSet | string | |
리턴 | bool |
public RestoreBackupTable ( string backupTableName ) : bool | ||
backupTableName | string | |
리턴 | bool |
public static SetFileDataOnResourceItem ( Westwind.Globalization.ResourceItem item, byte data, string fileName ) : Westwind.Globalization.ResourceItem | ||
item | Westwind.Globalization.ResourceItem | |
data | byte | |
fileName | string | |
리턴 | Westwind.Globalization.ResourceItem |
public UpdateOrAddResource ( Westwind.Globalization.ResourceItem resource ) : int | ||
resource | Westwind.Globalization.ResourceItem | Resource to update |
리턴 | int |
public UpdateOrAddResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int | ||
resourceId | string | |
value | object | |
cultureName | string | |
resourceSet | string | |
comment | string | |
valueIsFileName | bool | |
valueType | int | |
리턴 | int |
public UpdateResource ( Westwind.Globalization.ResourceItem resource ) : int | ||
resource | Westwind.Globalization.ResourceItem | Resource to update |
리턴 | int |
public UpdateResource ( string resourceId, object value, string cultureName, string resourceSet, string comment = null, bool valueIsFileName = false, int valueType ) : int | ||
resourceId | string | |
value | object | |
cultureName | string | |
resourceSet | string | |
comment | string | |
valueIsFileName | bool | |
valueType | int | |
리턴 | int |