Here is my question: how to define global section functor from D-module on affine flag variety to representation of affine Lie algebra?

Let's me explain the difficulty: it seems there doesn't exist global definition of D-module on ind-scheme. For affine flag variety, it is a union of finite dimensional subvarieties, and usually we can't make them smooth. We should think of a D-module on a singular variety as a usual D-module on big smooth space which supports on this singular variety. On the other hand, the global sections of D-module depends on the embedding of singular variety to the other smooth One.

I really don't know how to think of global section functor of D-module on affine flag variety, so I don't know how to formulate the localization theorem.

Maybe I should look at Frenkel-Gaitsgory's paper, but I'm afraid it is a question before reading their papers.

Moreover, I would like to know what is the status of localization theorem for affine Lie algebra? 1. at Critical level 2. at noncritical level