Ignore:
Timestamp:
2010-11-09T00:36:45+01:00 (15 years ago)
Author:
oliverw
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmUtils.java

    r24130 r24166  
    1515
    1616import java.util.List;
     17import java.util.Locale;
    1718
    1819import org.openstreetmap.josm.data.coor.LatLon;
     
    2930public class OsmUtils {
    3031        private OsmUtils() {}
     32       
     33        private static String cachedLocale = null;
    3134       
    3235        /**
     
    146149                return false;
    147150        }
     151       
     152        /**
     153         * Gets the locale code as string.
     154         *
     155         * @return the locale
     156         */
     157        public static String getLocale() {
     158                // Check if user could prefer imperial system
     159                if (cachedLocale == null) {
     160                        Locale l = Locale.getDefault();
     161                        cachedLocale = l.toString();
     162                }
     163                return cachedLocale;
     164        }
    148165
    149166        private static void applyDerivedValue(OSMAddress address, Way w, String tag) {
Note: See TracChangeset for help on using the changeset viewer.