Class LocalizationService

Localization form Admin service that provides JSON data for the admin interface.

System.Object
  Westwind.Web.CallbackHandler
    Westwind.Globalization.Web.Administration.LocalizationService
public class LocalizationService : CallbackHandler

Class Members

MemberDescription

Constructor

STR_RESOURCESET

Backup

Backs up the resource table into a new table with the same name + _backup

public bool Backup()

CreateClass

Creates .NET strongly typed class from the resources. Pass: fileName, namespace, classType, resourceSets as a map.

public bool CreateClass(object parms)

CreateTable

Creates a new localization table as defined int he configuration if it doesn't exist. If the table exists an error is returned.

public bool CreateTable()

DeleteResource

Delete an individual resource. Pass resourceId, resourceSet and localeId as a map. If localeId is null all the resources are deleted.

public bool DeleteResource(object parm)

DeleteResourceSet

Deletes an entire resource set.

public bool DeleteResourceSet(string resourceSet)

ExportResxResources

Export resources from database to Resx files.

public bool ExportResxResources(object parms)

GetAllLocaleIds

Returns a list of the all the LocaleIds used in a given resource set

public IEnumerable GetAllLocaleIds(string resourceSet)

GetAllResourcesForResourceGrid

public object GetAllResourcesForResourceGrid(string resourceSet)

GetLocalizationInfo

Returns configuration information so the UI can display this info on the configuration page.

public object GetLocalizationInfo()

GetResourceItem

Returns an individual ResourceIdtem for a resource ID and specific culture. pass resourceId, resourceSet, cultureName in an object map.

public ResourceItemEx GetResourceItem(object parm)

GetResourceItems

Returns all resources for a given Resource ID. Pass resourceId, and resourceSet in an object map.

public IEnumerable GetResourceItems(object parm)

GetResourceList

public IEnumerable GetResourceList(string resourceSet)

GetResourceListHtml

public IEnumerable GetResourceListHtml(string resourceSet)

GetResourceSets

Returns a list of all ResourceSets

public IEnumerable GetResourceSets()

GetResourceString

Returns a resource string based on resourceId, resourceSet,cultureName

public string GetResourceString(object parm)

GetResourceStrings

Gets all resources for a given ResourceId for all cultures from a resource set.

public IEnumerable GetResourceStrings(string resourceId,     string resourceSet)

ImportResxResources

Import resources from Resx files into database

public bool ImportResxResources(string inputBasePath)

IsLocalizationTable

checks to see if the localiztion table exists

public bool IsLocalizationTable()

IsRtl

Determines whether a locale is an RTL language

public bool IsRtl(string localeId)

ReloadResources

Clears the resource cache. Works only if using one of the Westwind ASP.NET resource providers or managers.

public void ReloadResources()

RenameResource

Renames a resource key to a new name.

Requires a JSON object with the following properties: { }

public bool RenameResource(object parms)

RenameResourceProperty

Renames all resource keys that match a property (ie. lblName.Text, lblName.ToolTip) at once. This is useful if you decide to rename a meta:resourcekey in the ASP.NET markup.

public bool RenameResourceProperty(string Property,     string NewProperty,     string ResourceSet)

RenameResourceSet

Renames a resource set to a new name.

public bool RenameResourceSet(string oldResourceSet,     string newResourceSet)

Translate

public string Translate(object parm)

UpdateComment

Updates just a comment for an individual resourceId. Pass resourceId, resourceSet and localeId in a map.

public bool UpdateComment(object parm)

UpdateResource

Updates or Adds a resource if it doesn't exist

public bool UpdateResource(ResourceItem resource)

UpdateResourceString

Adds or updates a resource. Pass value, resourceId,resourceSet,localeId,comment as a map.

public bool UpdateResourceString(object parm)

UploadResource

Updates or adds a binary file resource based on form variables. ResourceId,ResourceSet,LocaleId and a single file upload.

public bool UploadResource()

Requirements

Namespace: Westwind.Globalization.Web.Administration
Assembly: westwind.globalization.web.dll

© West Wind Technologies, 2006 - 2019 • Updated: 01/25/18
Comment or report problem with topic