You may need to get the template type from which the SPWeb has been created. You must be thinking that to get this is really easy, there must be a property which gets us this value.
Well, it is really but there is no direct property. There is one property of SPWeb called WebTemplate. Let's try that.
and the result is
Now change it to this
1033 is for English. You may need to change it depending on the English.
and here we go
I hope this helps