Thread:Project:Support desk/sidbar box language vector/reply (5)

ULS may be overkill for your needs, but if it does what you want, you should use it.

Otherwise, read the source for Special:Preferences and adapt it to your needs.