# Gettext's Locale class in application namespace

**URL:** <https://www.ruby-forum.com/t/gettexts-locale-class-in-application-namespace/118023>\
**Category:** Rails I18n\
**Created:** [October 23, 2007, 12:14pm UTC](https://www.ruby-forum.com/t/gettexts-locale-class-in-application-namespace/118023 "2007-10-23T12:14:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samlown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@samlown](https://www.ruby-forum.com/u/samlown)\
**Post date:** [October 23, 2007, 12:14pm UTC](https://www.ruby-forum.com/t/gettexts-locale-class-in-application-namespace/118023/1 "2007-10-23T12:14:17Z")

</div>

Hi,

I’ve been trying to use Gettext with one my web applications. I’ve used  
Gettext many times in the past without problems and appreciate it  
greatly. In this particular instance, my web application has its own  
ActiveRecord Locale model which I use to store the locales the  
application will support. (I prefer to use Locale for the user  
interface, and Language for the language a model is available in; a  
subtle but important difference.)

The problem with Gettext in this situation however, is that it provides  
its own Locale class in the application namespace instead of something  
like Gettext::Locale. This conflicts with my Locale model, preventing  
things from working.

Globalize also provides its own Locale class, but sensibly inside the  
Globalize module’s namespace, i.e. Globalize::Locale so that it doesn’t  
cause any problems.

I would like to ask for any opinions on this matter, to see if anyone  
else agrees that Gettext’s Locale _should_ be inside the Gettext module.  
I’d also be interested in any recommendations for alternative methods,  
other than renaming my Locale model to something else which is the most  
obvious!

Thanks in advance,  
Cheers,  
Sam Lown

---

<div class="post-metadata">

**Author:** ![samlown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@samlown](https://www.ruby-forum.com/u/samlown)\
**Post date:** [October 28, 2007, 11:58am UTC](https://www.ruby-forum.com/t/gettexts-locale-class-in-application-namespace/118023/2 "2007-10-28T11:58:25Z")

</div>

For the moment, I’ve converted my own Locale model into SystemLocale so  
that it does not conflict with the interests of Gettext. Not the ideal  
situation IMHO, but it will suffice.

Cheers, sam
