# Globalize with uppercase locale attribute

**URL:** <https://www.ruby-forum.com/t/globalize-with-uppercase-locale-attribute/224725>\
**Category:** Rails I18n\
**Created:** [November 23, 2012, 10:38am UTC](https://www.ruby-forum.com/t/globalize-with-uppercase-locale-attribute/224725 "2012-11-23T10:38:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 23, 2012, 10:38am UTC](https://www.ruby-forum.com/t/globalize-with-uppercase-locale-attribute/224725/1 "2012-11-23T10:38:26Z")

</div>

Hi,  
I have this model:

```
class Event
    translates :nome, :descrizione
    # other stuff
end

```

Inside the database I have defined the event\_translations table with  
locale field as enum(‘IT’, ‘EN’)… The problem is that Globalize uses  
lowercase locale, and build queries like this one:

SELECT \* FROM `event_translations` WHERE (`event_translations`.`locale`  
IN (‘it’)) AND (`event_translations`.event\_id = 1406)

Instead of:

```
SELECT * FROM `event_translations` WHERE

```

(`event_translations`.`locale` IN (‘IT’)) AND  
(`event_translations`.event\_id = 1406)

Can you help me?  
Thanks in advance
