Created
February 7, 2016 13:24
-
-
Save webdevilopers/5bdc808e175425ee23ab to your computer and use it in GitHub Desktop.
Translate validation default messages in Symfony2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> | |
<file source-language="en" datatype="plaintext" original="file.ext"> | |
<body> | |
<trans-unit id="1"> | |
<source>Dieser Wert sollte nicht leer sein.</source> | |
<target>Bitte ausfüllen</target> | |
</trans-unit> | |
<trans-unit id="2"> | |
<source>Dieser Wert sollte nicht null sein.</source> | |
<target>Bitte ausfüllen</target> | |
</trans-unit> | |
<trans-unit id="22"> | |
<source>This value should not be blank</source> | |
<target>Bitte ausfüllen</target> | |
</trans-unit> | |
<trans-unit id="23"> | |
<source>This value should not be null</source> | |
<target>Bitte ausfüllen</target> | |
</trans-unit> | |
</body> | |
</file> | |
</xliff> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dieser Wert sollte nicht leer sein.: Bitte ausfüllen | |
Dieser Wert sollte nicht null sein.: Bitte ausfüllen | |
Dieser Wert sollte nicht leer sein: Bitte ausfüllen | |
Dieser Wert sollte nicht null sein: Bitte ausfüllen | |
This value should not be blank: Bitte ausfüllen | |
This value should not be null: Bitte ausfüllen |
Must have copied a xlf file by @chobi that was actually "missing the point" too:
https://github.com/chobie/Symfony2VagrantSandbox/blob/master/www/Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.de.xliff#L94
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en" datatype="plaintext" original="file.ext">
<body>
<trans-unit id="22">
<source>This value should not be blank.</source>
<target>Bitte ausfüllen</target>
</trans-unit>
<trans-unit id="23">
<source>This value should not be null.</source>
<target>Bitte ausfüllen</target>
</trans-unit>
</body>
</file>
</xliff>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following this answer by @cheesemacfly:
http://stackoverflow.com/questions/14984112/overwrite-the-notblank-constraint-message-on-symfony2-1-globally
All files are located under
app/Resources/translations
. Cache cleared. No change.Any idea?
Twitter discussion:
https://twitter.com/webdevilopers/status/696324723588911104