Standard languages arise when a certain dialect begins to be used in written form, normally throughout a broader area than that of the dialect itself.
Even a standard language that was originally based on one local dialect changes, however, as elements of other dialects infiltrate into it over the years. The actual development in any one linguistic area depends on historical events. Sometimes even the distribution of standard languages may not correspond to the dialectal situation.