Index: django/utils/translation/trans_real.py
===================================================================
--- django/utils/translation/trans_real.py	(revision 17159)
+++ django/utils/translation/trans_real.py	(working copy)
@@ -158,10 +158,11 @@
 
         for appname in reversed(settings.INSTALLED_APPS):
             app = import_module(appname)
-            apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
+            if hasattr(app, '__file__'):
+                apppath = os.path.join(os.path.dirname(app.__file__), 'locale')
 
-            if os.path.isdir(apppath):
-                res = _merge(apppath)
+                if os.path.isdir(apppath):
+                    res = _merge(apppath)
 
         localepaths = [os.path.normpath(path) for path in settings.LOCALE_PATHS]
         if (projectpath and os.path.isdir(projectpath) and
