<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,6 +13,10 @@ module Globalize
         super
       end
 
+      def available_locales
+        Translation.find(:all, :select =&gt; &quot;DISTINCT locale&quot;).map { |t| t.locale.to_sym }
+      end
+
       protected
         def lookup(locale, key, scope = [])
           # TODO find in the cache</diff>
      <filename>lib/globalize/backend/database.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,10 @@ class DatabaseTest &lt; ActiveSupport::TestCase
     end
   end
 
+  test &quot;available locales&quot; do
+    assert_equal [:en, :cz], I18n.available_locales
+  end
+
   test &quot;should create translations&quot; do
     I18n.backend.store_translations :en, { :hello =&gt; &quot;Hello&quot; }
     assert_equal &quot;Hello&quot;, I18n.translate(:hello)</diff>
      <filename>test/backends/database_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>600b95d08a6a498643d6d78a283e1aafaf58e9f0</id>
    </parent>
  </parents>
  <author>
    <name>Luca Guidi</name>
    <email>guidi.luca@gmail.com</email>
  </author>
  <url>http://github.com/jodosha/globalize2/commit/bdf8e524ce3ad2f6c5309d447ef8b3668d43053b</url>
  <id>bdf8e524ce3ad2f6c5309d447ef8b3668d43053b</id>
  <committed-date>2009-03-31T02:49:39-07:00</committed-date>
  <authored-date>2009-03-31T02:49:39-07:00</authored-date>
  <message>Implement Database#available_locales</message>
  <tree>d6974d8128d35ba5f29c5ccd4063062a04f1cde2</tree>
  <committer>
    <name>Luca Guidi</name>
    <email>guidi.luca@gmail.com</email>
  </committer>
</commit>
