symfony - Storing language independent strings in separate yaml files -


We have recently started developing our website in Symphony and using the tag templing engine. Stringes are stored in separate yaml files, where we have separate files for each language (using these to be {{variablename 'trans}} ). Now I wonder what the best way to store language independent wires like email addresses is that we can definitely store them in the default language file so that they can go to all fallbacks, but maybe there is a cleaner way. Use the default language because the key is a way to reach your goal.

Personally, I would like to do this notation & lt; Bundle & gt; & Lt; Section & gt; & Lt; Key (like acme_user.profile.username ). I am using this syntax because its more readable and maintainable and Symphony (specific YAM) is a build in support for this notation.

  acme_user: profile: username: username change_password: password: password  

in your template you can call them {{acme_user.profile.username ' | Trans}}

Hope it helps. / P>


Comments