Typically, in informal writing, you write it as you say it in your dialect, and in formal writing, you use the standardized form of the language if there is one.