Always use the expected Locale when formatting an api parameter string

This fixes exceptions that appeared when the device locale is set to for
example arabic, which formats integer numbers using eastern arabic glyphs.