Possible FormatPhoneNumber Bug

The FormatPhoneNumber function in globals.cs attempts to derive the region code from the current language with this line:

region = CurrentLanguage.Replace("_", "-").Split('-').First();

In my case at least, the CurrentLanguage returns "en_US" which parses to "en". Unfortunately, the format function is expecting "US".

I can fix it by passing the correct region, but wanted to share for others.

Update template and try again.

No luck. It looks like the line was changed to force upper case:

region = CurrentLanguage.Replace("_", "-").Split('-').First().ToUpper();

However (for me at least) the CurrentLanguage is "en_US" so the First() returns "en" instead of "US".

Try latest template (Tools -> Update Template)

Thanks. That works.