In principle a visa leading to settlement (eg Fiance(e)/Spouse/Partner) can be applied for in the country you are living in, provided you are legally residing there and not on a short term temporary visa such as visitor.
My wife applied for her UK visa from the British Embassy in Tokyo.
As joe suggests if you are in any doubt about your own personal circumstances and visa conditions then secure confirmation from the British Embassy.