I have a field in my application where the user has to type the culture for the language (Ex. en-US or es-MX). I want to help the user to select the correct format by adding auto completion using the jquery plugin. I need the list of all culture names to accomplish it.
Is there a way to get the list of all culture names using only javascript?
Save the list of culture codes in a flat file somewhere on your server (that way you can use ajax without any XSS concerns). Then load the contents of the file with
$.ajaxor something similar, parse, and add to the auto-complete plugin.Here is a link to a list of codes from a quick google search