I need to programmatically add a web part to a page where the title is using a $Resources:Filename,Key; string.
I know I can use SPUtility.GetLocalisedString() to retrieve the correct value (and loop through the SPWeb.SupportedUICultures to set the value for each language) but the problem with that is that it will only set it for languages in use now ... what happens if we install a new language pack next month? (we'd have to loop through all our web part instances and add the new language text for each one... a PITA).
If I was adding a web part in the onet.xml I could just use Title="$Resources:fileName,key;" and it would automatically pick up any translations from available installed RESX files automatically.
How can I do this programmatically? (i.e. in C#)