PRELIMINARY INFORMATION - SUBJECT TO CHANGE
Performs a setup of the localization by synchronizing resource strings from an XML source to the database.

Syntax

Smartsite SXML CopyCode image Copy Code
datatable locale.setup(locator xml, enum mode)

Parameters

Name Data Type Description
xml Locator Item containing the XML with string resources. The XML may be in the 2.0 format that supports to specify resources per application, or may be in de 1.0 format that lacks applications and assumes the default application.
mode Enum Setup mode. Specify Count to count the number of inserts, updates and deletes that would be performed, without actually modifying the database. Specify Insert to insert new resources. Specify Update to insert new resources and to update the value of existing resources. Specify Delete to perform all necessary inserts, updates and deletes to make the database equal to the supplied resources, for the involved applications. Note that inserts and updates for the default application are honoured; deletes however will not be performed for the default application.
Enum values:
  • Count
    Count only; do not actually insert, update or delete. Count the number of resource strings that would be inserted, updated and deleted, without actually changing the database.
  • Insert
    Insert new resources strings; do not update or delete. Insert new resources strings. Do not update existing resource strings. Keep existing resource strings, even if no longer present in the input set.
  • Update
    Insert and update resource strings; do not delete. Insert new resources strings. Update existing resource strings if their value has changed. Keep existing resource strings, even if no longer present in the input set.
  • Delete
    Insert, update and delete resources strings as necessary. Insert new resources strings. Update existing resource strings if their value has changed. Delete resources strings that are present in the database and that are no longer present in the input set. This requires that the input set contains all resource strings for an application; for each of the applications listed in the input set. Note however that resources of the default application will not be deleted this way.

Return Value

Data Type Description
DataTable Returns an one-row three-column table with the number of inserts, updates and deletes that would be performed or that are actually performed. Each application specific / resource key specific / culture specific resource string is counted individually.
SXML