How to Localize Your Custom Task

The DtsTask attribute has a LocalizationType member. This should be your resource class. SSIS will look for two properties:

  • TaskDisplayName
  • TaskDescription

These must be public, static string properties on your “LocalizationType” class.

Your task code would look like this:

You can add localizable string resources to your class from the Project settings:

clip_image001

Note, the Access Modifier must be set to Public.

Double note (as I hit this when putting together the blog post) – in SQL 2012, when you first add a new task to your <sql>110DTSTasks directory, you can right click on the SSIS Toolbox and select Refresh Toolbox to make it show up.

clip_image002

If your LocalizationType settings are incorrect (for example, you forgot to set the Access Modified to Public), your task will show up with an empty name. You must fix your class and rebuild, but you’ll need to restart Visual Studio before the changes take effect (as the class has been instantiated, SSIS will have the old object cached…).

Leave a Reply

You must be logged in to post a comment.