How are themes and plugins localized using the gettext GNU framework?

How are themes and plugins localized using the gettext GNU framework?