I have created my own custom module. All of my outputted strings are wrapped in t functions. I have enabled Locale in core. I need to alter some of my module's strings and some field labels too, slightly, just a word here and there, form British English into US English.
What I'm trying to acheive is: if my site is being viewed in the US I want that to be automatically detected, and the adjusted strings/field labels displayed.
Thanks.
Solution: Install ip2country
module. This provides a function called ip2country_get_country
which returns an ISO 3166 two-character country code based on the user's IP address. Create a helper function that returns a boolean TRUE/FALSE is the country code is 'US'. Then just use if-else constructs to translate the required text.