class Locale # is this a String? maybe not. attr :language, :script, :region, :variant, :extension, :private_use def valid? # validate against RFC4646 end def parent # return 'en' for 'en-US' etc. end end