Add support for loading preference keys as @string resources.

Closes #1007.