# File lib/gettext.rb, line 224 def set_locale(locale, this_target_only = false) ret = nil if locale if locale.kind_of? Locale::Object ret = locale else ret = Locale::Object.new(locale.to_s) end ret.charset = output_charset if output_charset Locale.set(ret) else Locale.clear ret = Locale.get end if this_target_only manager = @@__textdomainmanagers[bound_target] if manager manager.set_locale(ret) end else each_textdomain {|textdomain| textdomain.set_locale(ret) } end self end