Time zone editor control (adminLocalizationTimeZoneEditor. ascx) has a feature that checks the differences between the localized XML file (App_GlobalResourcesTimeZones.zh-CN.xml) that stores time zone information and the default XML file (App_GlobalResourcesTimeZones.xml) that stores time zone information. When the local file lacks the corresponding entries, it is required to be added. If there are redundant entries, it is automatically deleted. (Whether the entries are the same are identified by key values. The following XML contains the key values)
If I add an entry with the same key to the localization file, for example:
<Root>
<! --
Name = "Time Zone name"
Key = "offset relative to GMT (Greenwich Mean Time"
-->
<! --There is a duplicate key value-->
<TimezoneName= "(GMT) Greenwich Mean Time: Dublin, Edinburgh, London"Key= "0" />
<TimezoneName= "(GMT) Greenwich Mean Time: Dublin, Edinburgh, London"Key= "0" />
<TimezoneName= "(UTC-12:00) International Date change line"Key= "-720" />
<TimezoneName= "(UTC-11: 00) Midway Island and Malaysia islands"Key= "-660" />
<TimezoneName= "(UTC-10:00) Hawaii"Key= "-600" />
<! --Remaining omitted-->
</Root>
In any case, the system will prompt that there is a lack of entries and the redundant entries cannot be deleted, for example:
Solution: after reading the localized file to the dataset, define the key of the time zone information table as the primary key. If the definition is unsuccessful (with duplicate keys), an error is prompted and corresponding error handling is performed.