symfony/symfony — Issue #2352: Translation only works on first request when using "de" instead of "de_DE" resource file
Author: dennisjac
Created: 2011-10-08 00:39:33+00:00
State: open

I just noticed that when I put my translations in the file "messages.de.xliff" instead of "messages.de_DE.xliff" then the translation will only work for one request and then always fall back to the default locale until I clear the cache.

Output of "$translate->trans('Hello world')":

with "messages.de.xliff":
Request 1: "Hallo Welt"
Request 2: "Hello world"
Request 3: "Hello world"

with "messages.de_DE.xliff":
Request 1: "Hallo Welt"
Request 2: "Hallo Welt"
Request 3: "Hallo Welt"