(Too long for a comment). This is a (vague) comment on Qiaochu Yuan's comment on whether $\widehat{\mathfrak g_1} \simeq \widehat{\mathfrak g_2}$ implies $\mathfrak g_1 \simeq \mathfrak g_2$. This is definitely true.
The twisted case could be reduced somehow to the untwisted one, so I will deal with the latter. By taking central quotients and commutants, the question is reduced to whether isomorphism of the corresponding loop algebras -- $\mathfrak g_1 \otimes \mathbb C[t,t^{-1}] \simeq \mathfrak g_2 \otimes \mathbb C[t,t^{-1}]$ -- implies the isomorpism of the underlying simple Lie algebras $\mathfrak g_1 \simeq \mathfrak g_2$. This is true even when the algebra of Laurent polynomials $\mathbb C[t,t^{-1}]$ is replaced by an arbitrary commutative associative algebra $A$ with unit, and probably can be dealt with by looking on some invariants of loop algebars (for example, looking on the second cohomology $H^2(\mathfrak g \otimes A, \mathfrak g \otimes A)$, we can separate the case of $sl(n)$ from the other types).
It can be dealt with, however, from a somewhat unusual viewpoint (which is probably an overkill): note that this isomorphism implies that the identities of algebras $\mathfrak g_1$ and $\mathfrak g_2$ are the same (as identities of $\mathfrak g \otimes A$ and $\mathfrak g$ are the same), and by theorem of Kushkulei and Razmyslov (see Yu.P. Razmyslov, Identities of Algebras and Their Representations, AMS, 1994 (translation from Russian), around p. 30), this implies $\mathfrak g_1 \simeq \mathfrak g_2$.