Just another code blog...

Importing custom cultures on an Azure VM

azure pack azure culture import export
Posted by: Claus @ Thursday, November 3, 2016

Recently a client requested being able to use a specific custom culture on his website running on an Azure VM. Initially I thought it would be as easy as just adding/enabling the language in question or maybe even install a language pack on the VM but it turned out it was a bit more complex. This specific culture (ru-UA) was not available on the Azure servers and I wasn't able to find it in a compatible language pack to install either.

Fortunately the culture seemed to be available on our own developer machines running Windows 10. My colleague who had the task assigned made a few attempts and successfully managed to make a simple command-line tool to export this culture from his own machine to a file. Now you would think it would be just as easy to actually import this culture on the server, but trying to do that would cause all kinds of errors - none of which made much sense. It seems like there's not really a lot of people who has actually been doing this kind of stuff so trying to find any clues as to what was wrong wasn't really an easy task.

I spent some time debugging the .NET classes related to managing cultures and after a while I had an idea about what could be causing the errors. It seemed like I was able to run the import as long as the culture already existed on my system. While this was a great discovery it didn't really help me much, since the whole purpose of importing a culture would be to get that specific culture installed on a machine where it wasn't alre…

Read more...

Posts by date