Stringify api_key

Fixes #2492
Use a string comparsion for locale parameters