Let's not do this.  We already have the list of langs vs. locales, since we pass those directly to the i18n module.  Just put that array in a variable you can use to pass into the template when you render it.