As far as I know, the C standards and GNU gettext do not offer any way to know the measurement units used in a country, there are no third party libraries that do the job and there are no ready to used databases (free or proprietary).
However, according to CIA - The World Factbook:
At this time, only three countries - Burma, Liberia, and the US - have not adopted the International System of Units (SI, or metric system) as their official system of weights and measures.
So it is fairly easy to write your own code, even without a database or third party libraries. You just have to special case three LC_MEASUREMENT
values (or, better, three patterns, as some of these countries have more than a language):
- Burma (language code pattern:
*_MM
) uses the Burmese system; - Liberia (language code pattern:
*_LR
) uses the Imperial system; - United States (language code pattern:
*_US
) use a customary system similar to the Imperial one. - all other countries use the International System of Units.
UPDATE: all of these countries are in the (slow) process of converting to the metric system (SI). This is probably an another reason why nobody has bothered writing some libraries, code snippets or databases.