check locale before use