Deleting locales from a message catalog file
You can delete an entire locale from a message catalog file using the deleteLanguage:territory:characterSet:index: protocol. This operation removes both the indexed external messages and the external message dictionary stored for the specified language, territory, and character set and does not affect objects stored for any other locale. The following example demonstrates how to delete a locale from a message catalog file.
"A code fragment to remove all objects stored for the
#('english' 'us') locale and the 'iso8859-1' character set."
| catalog |
catalog := NlsMessageCatalog on: ''.
deleteLanguage: 'english'
territory: 'us'
characterSet: 'iso8859-1') ifFalse: [
^self error: 'Deletion error: ',catalog currentErrorString].
Deleting a locale does not immediately decrease the size of the message catalog file on disk. Deleted locales are marked as garbage and their space is reclaimed when the message catalog file is compressed. See Compression for a discussion of the compression of message catalog files.
Deletion is a permanent operation and cannot be undone. Once deleted, all objects stored for a locale are lost.
Last modified date: 01/29/2015