I have a form translator that loops through a page's control collection and translates any text which has a new phrase for the current culture stored in the database. But it turns out this is not enough. I also need to be able to translate strings stored in fields. For this purpose, I want to annotate these strings with a new custom attribute called Localizable:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyProject.Business.BusinessHelp
{
public class Localizable : Attribute
{
}
}
Which can be used like this:
[Localizable]
public string articles = "articles";
[Localizable]
public string summary = "summary";
(amidst many fields which aren't Localizable, of course)
So how do I retrieve a list of these at runtime, using Page or Page.Form?