Interface translation in symfony – tool for teams

Shyamal Mehta

I mentioned in my previous post how we decouple the translation dictionary completely from the source so that a change in any text does not affect the templates. That has helped us a lot in several large projects.

Another issue which we frequently encountered when multiple people worked on the same project is conflicting and merging of the dictionary files. Since these files have sequential numbers in each


block, if multiple people want to add translations, these suquential numbers almost overlap and have to be rewritten manually while checking in.

So we decided to generate these symfony interface translation dictionary files using a script. So here’s what we do:

  •  put the translations in a properties file: Create one properties file for each language. So for English we create “”. This has translations like:

This ensures that even when multiple people add translations to these files (using a source control like CVS or SVN) there are no issues.

  • Also put the following file createXML.php in the same i18b folder.  Â
  • Now you can simply call this script from the command prompt to generate the xml dictionary.
php createXML.php > messages.en.xml

That was pretty simple to do. There are some enhancements this requires, like it should by itself generate all translation files based on the properties files available. But thats for when i get more time to work on it.

about the author

Shyamal Mehta

Shyamal is an experienced technology professional having expertise on the web and mobile technologies. His strength lies in his ability to successfully and repeatedly deliver projects and products (large and small) for a variety of industries.

  1. Betsy Gremo

    July 11, 2012

    I do like the manner in which you have framed this particular problem plus it does indeed offer me personally some fodder for thought. On the other hand, through what I have personally seen, I just simply trust when the actual commentary stack on that people today stay on point and not embark on a soap box associated with some other news of the day. Anyway, thank you for this superb point and though I do not go along with this in totality, I regard your perspective.

  2. Bill Colyer

    June 10, 2013

    Particularly interesting cheers, It is my belief your trusty visitors may well want considerably more items of this naturel continue the excellent effort.

  3. Diamond

    June 13, 2013

    Thanks for the concepts you share through this site. In addition, quite a few young women exactly who become pregnant usually do not even attempt to get medical health insurance because they are concerned they wouldn’t qualify. Although a lot of states today require that insurers present coverage despite the pre-existing conditions. Charges on these kinds of guaranteed plans are usually larger, but when considering the high cost of health care it may be some sort of a safer approach to take to protect one’s financial future.

  4. Lesha

    June 13, 2013

    I wanted to develop a simple message in order to appreciate you for these pleasant facts you are placing at this site. My considerable internet look up has finally been recognized with professional facts and techniques to talk about with my visitors. I ‘d claim that many of us readers actually are quite lucky to dwell in a decent website with so many awesome people with beneficial basics. I feel somewhat lucky to have seen the website and look forward to tons of more brilliant moments reading here. Thanks a lot once again for all the details.

  5. Carlos

    June 14, 2013

    These days of austerity as well as relative anxiety about taking on debt, a lot of people balk contrary to the idea of making use of a credit card to make acquisition of merchandise as well as pay for a trip, preferring, instead only to rely on the tried plus trusted approach to making settlement – hard cash. However, if you’ve got the cash on hand to make the purchase in full, then, paradoxically, this is the best time for you to use the credit cards for several motives.

  6. Leif Muffett

    June 14, 2013

    I would love to be anywhere near a beach!

  7. Daniela

    June 14, 2013

    I have read some good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to make such a fantastic informative web site.

  8. Female Choice Porn Videos

    June 14, 2013

    I used to attend the USGP at Watkins Glen for several decades during the 70s and saw Sir Stirling as well as many other people race. Whenever I returned from a race the common ignorant individual would often ask if we noticed any crashes or if anyone bought killed. Although a spectacular crash is one area to discover, I attend reces for the race as well as close action NOT for that potential of death. A year in combat in Viet Nam was ample death for me.

  9. Gary

    June 15, 2013

    Thanks a lot for your post. I’d like to comment that the tariff of car insurance varies widely from one insurance plan to another, for the reason that there are so many different facets which contribute to the overall cost. As an example, the model and make of the car will have a massive bearing on the fee. A reliable older family automobile will have an inexpensive premium than a flashy fancy car.

  10. Lazaro Toten

    June 15, 2013

    Pretty portion of content. I simply stumbled upon your web site and in accession capital to claim that I acquire actually loved account your blog posts. Any way I’ll be subscribing to your augment or even I fulfillment you access consistently quickly.

  11. Refugio

    June 15, 2013

    One thing is one of the most widespread incentives for applying your credit card is a cash-back or perhaps rebate present. Generally, you’re going to get 1-5% back on various purchases. Depending on the cards, you may get 1% returning on most acquisitions, and 5% back on expenses made at convenience stores, filling stations, grocery stores along with ‘member merchants’.

  12. Cory Hohenstein

    June 15, 2013

    I haven’t checked in here for a while as I thought it was getting boring, but the last several posts are good quality so I guess I’ll add you back to my daily bloglist. You deserve it my friend 🙂

  13. Dudley Wallingford

    June 17, 2013

    Just want to say your article is as amazing. The clearness in your post is just great and i could assume you are an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please carry on the rewarding work.

  14. Vaughn Crasco

    June 17, 2013

    I have learn some excellent stuff here. Definitely value bookmarking for revisiting. I surprise how so much effort you put to make such a fantastic informative web site.

  15. bad credit loan for car

    June 17, 2013

    Why is my system’s twist on nutrient density essential.

  16. Merlene Sud

    June 19, 2013

    Undeniably believe that which you stated. Your favorite justification seemed to be on the net the simplest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they plainly don’t know about. You managed to hit the nail upon the top and defined out the whole thing without having side-effects , people can take a signal. Will probably be back to get more. Thanks

  17. Kurt Wibbenmeyer

    June 19, 2013

    Thanks for your post. I also think that laptop computers have grown to be more and more popular currently, and now will often be the only kind of computer included in a household. It is because at the same time actually becoming more and more affordable, their computing power keeps growing to the point where they are as powerful as pc’s out of just a few in years past.

  18. Porfirio Sneller

    June 20, 2013

    I have seen plenty of useful points on your site about pc’s. However, I have got the opinion that laptops are still less than powerful sufficiently to be a good selection if you often do things that require a lot of power, like video touch-ups. But for world wide web surfing, word processing, and the majority of other frequent computer work they are perfectly, provided you don’t mind the little screen size. Appreciate sharing your notions.


    June 20, 2013

    Whilst I have nothing to prove it, I saw these plates ona Tucker during the Chicago parade introducing the car. I stood on th sidewalk with my Father, now extensive Passed, and watched with fascination. I am sorry the car didn’t last. Who knows what might have happened in engineering and design and style maturity?

  20. Lory Zufelt

    June 21, 2013

    Just desire to say your article is as amazing. The clearness in your post is just cool and i can assume you’re an expert on this subject. Fine with your permission let me to grab your feed to keep updated with forthcoming post. Thanks a million and please continue the enjoyable work.

  21. Santos Jump

    June 21, 2013

    Nice blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your theme. Cheers

  22. Celeste Penuel

    June 22, 2013

    I wanted to create you a very small remark in order to thank you once again for the magnificent information you have documented on this site. This is really unbelievably generous with you in giving extensively precisely what numerous people would have distributed as an ebook to make some dough for their own end, most importantly given that you might have done it in case you desired. Those guidelines also acted as the fantastic way to know that some people have similar dream the same as my very own to see a good deal more on the topic of this issue. Certainly there are numerous more pleasurable opportunities ahead for individuals that browse through your blog.

  23. Frances Hamiss

    June 22, 2013

    Needed to create you a tiny remark so as to say thank you as before just for the extraordinary views you have shown in this article. It has been really shockingly open-handed of people like you to grant unreservedly exactly what a number of people might have offered as an electronic book to help with making some profit on their own, specifically now that you could possibly have tried it if you wanted. Those smart ideas as well acted as the easy way to comprehend other people online have a similar passion like my own to find out many more with reference to this matter. I know there are lots of more pleasurable occasions in the future for individuals that scan your site.

  24. Annemarie Fabbozzi

    June 23, 2013

    Thank you for the auspicious writeup. It in fact was once a entertainment account it. Look advanced to far added agreeable from you! By the way, how can we be in contact?

  25. Eliseo Waltzer

    June 23, 2013

    By my research, shopping for electronic devices online can for sure be expensive, but there are some how-to’s that you can use to help you get the best offers. There are always ways to obtain discount promotions that could make one to have the best consumer electronics products at the cheapest prices. Great blog post.

  26. Lauretta Chadez

    June 23, 2013

    I have figured out some points through your blog post. One other stuff I would like to mention is that there are lots of games that you can buy which are designed specially for preschool age little ones. They incorporate pattern acknowledgement, colors, dogs, and patterns. These commonly focus on familiarization rather than memorization. This will keep a child engaged without sensing like they are studying. Thanks

  27. Arleen Terrel

    June 23, 2013

    I think this is among the most important info for me. And i am glad reading your article. But should remark on few general things, The web site style is wonderful, the articles is really nice : D. Good job, cheers

  28. website designers barrow

    June 25, 2013

    Bloghopping is definitely my forte and i like to take a look at blogs.

  29. Becky Blumenstein

    June 25, 2013

    I like what you guys are up also. Such smart work and reporting! Carry on the superb works guys I’ve incorporated you guys to my blogroll. I think it will improve the value of my site 🙂

  30. Digna Kasee

    June 26, 2013

    I really like what you guys tend to be up too. This sort of clever work and reporting! Keep up the great works guys I’ve included you guys to my personal blogroll.|

  31. staplare

    June 26, 2013

    I picture this could be quite a few upon the written content material? nevertheless I nonetheless consider that it may perhaps be suitable for just about any type of topic subject matter, as a result of it will regularly be gratifying to resolve a warm and delightful face or perhaps pay attention a voice whilst initial landing.

  32. mehr Inhalt

    June 28, 2013

    Very interesting details you have noted , regards for putting up. “You can tell the ideas of a nation by it’s advertisements.” by Douglas South Wind.

  33. folgen Sie dem Link

    July 2, 2013

    My partner and I absolutely love your blog and find nearly all of your post’s to be just what I’m looking for. Do you offer guest writers to write content available for you? I wouldn’t mind producing a post or elaborating on most of the subjects you write in relation to here. Again, awesome website!

  34. Glenn Korsak

    July 3, 2013

    One thing I’d really like to touch upon is that weight loss program fast can be achieved by the correct diet and exercise. Your size not just affects appearance, but also the overall quality of life. Self-esteem, depressive disorder, health risks, plus physical capabilities are damaged in excess weight. It is possible to do everything right whilst still having a gain. In such a circumstance, a problem may be the primary cause. While excessive food and never enough work out are usually to blame, common medical conditions and widespread prescriptions can easily greatly enhance size. Many thanks for your post right here.

  35. Dolores Burlson

    July 6, 2013

    At this time it appears like WordPress is the preferred blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?

  36. Janay Hammed

    July 7, 2013

    My coder is trying to convince me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on various websites for about a year and am concerned about switching to another platform. I have heard excellent things about Is there a way I can transfer all my wordpress content into it? Any help would be greatly appreciated!

  37. John Reese

    July 8, 2013

    I would seriously like you to grow to be a guest poster on my weblog.*”,~,

  38. resource

    July 19, 2013

    You’re so awesome! I do not believe I have read a single thing like this before. So good to find somebody with unique thoughts on this topic. Seriously.. thanks for starting this up. This website is one thing that is required on the web, someone with some originality!

  39. obat wasir ampuh

    July 21, 2013

    when the stepfather helps her out of an embarrassing situation, this perceived antagonist becomes an ally.

  40. click for info

    July 21, 2013

    Your style is so unique in comparison to other people I have read stuff from. I appreciate you for posting when you have the opportunity, Guess I’ll just bookmark this web site.

  41. How to Get Rid of Zits

    July 21, 2013

    The the next time I just read a weblog, I hope that this doesnt disappoint me up to this. I imply, I know it was my replacement for read, but I actually thought youd have one thing interesting to talk about. All I hear is usually a variety of whining about one thing you may repair for those who werent too busy keen on consideration.

  42. Ashlea Cariaso

    July 23, 2013

    I’m glad that needs to be one of many visitors within this great website (:, regards for adding.

  43. see here

    July 23, 2013

    You’re so awesome! I don’t suppose I’ve read something like that before. So great to find another person with genuine thoughts on this topic. Really.. thanks for starting this up. This web site is one thing that is needed on the web, someone with a bit of originality!

  44. her explanation

    July 26, 2013

    You made some good points there. I checked on the net to learn more about the issue and found most people will go along with your views on this site.

  45. Michael Arkin

    August 30, 2013

    It’s a shame you don’t have a donate button! I’d certainly donate to this fantastic blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this site with my Facebook group. Talk soon!

  46. Gerda Wax

    August 31, 2013

    Terrific paintings! That is the kind of information that are meant to be shared around the web. Shame on the search engines for not positioning this post upper! Come on over and talk over with my web site . Thank you =)

  47. Kennith Mashack

    September 3, 2013

    I used to be more than happy to search out this internet-site.I needed to thanks for your time for this excellent learn!! I definitely enjoying each little little bit of it and I have you bookmarked to check out new stuff you blog post.

  48. Judith Teichrow

    September 3, 2013

    Hi! Quick question that’s totally off topic. Do you know how to make your site mobile friendly? My weblog looks weird when browsing from my iphone. I’m trying to find a theme or plugin that might be able to correct this problem. If you have any suggestions, please share. Many thanks!

  49. Johnny Ryther

    September 5, 2013

    Thanks for the suggestions about credit repair on this particular site. What I would offer as advice to people is usually to give up the actual mentality that they buy right now and shell out later. As being a society most of us tend to do this for many factors. This includes vacation trips, furniture, plus items we would like. However, you must separate your own wants out of the needs. While you’re working to improve your credit rating score make some sacrifices. For example you can shop online to economize or you can check out second hand suppliers instead of high priced department stores intended for clothing.

  50. Arlie Sessin

    September 5, 2013

    Thanks for the helpful posting. It is also my opinion that mesothelioma cancer has an incredibly long latency interval, which means that indication of the disease may well not emerge until finally 30 to 50 years after the original exposure to asbestos. Pleural mesothelioma, and that is the most common style and influences the area round the lungs, could potentially cause shortness of breath, chest muscles pains, and a persistent cough, which may produce coughing up maintain.

  51. Milan Laman

    September 10, 2013

    Fantastic items from you, man. I’ve keep in mind your stuff prior to and you are simply too great. I actually like what you have bought right here, certainly like what you’re stating and the way in which wherein you say it. You’re making it entertaining and you still care for to keep it sensible. I can not wait to read much more from you. This is actually a great site.

  52. Randy Retterbush

    September 10, 2013

    There is obviously a lot to know about this. I think you made various nice points in features also.

  53. Delsie Minderman

    September 10, 2013

    I have seen that now, more and more people are now being attracted to surveillance cameras and the area of photography. However, as a photographer, you must first spend so much time deciding the model of camera to buy in addition to moving from store to store just so you could buy the least expensive camera of the trademark you have decided to pick. But it does not end at this time there. You also have to think about whether you can purchase a digital camera extended warranty. Many thanks for the good recommendations I received from your blog.

  54. Health Affiliate Network

    September 19, 2013

    Thank you so much for giving everyone an extremely nice chance to discover important secrets from this web site. It really is very amazing plus packed with amusement for me personally and my office acquaintances to search your site more than 3 times a week to read the fresh things you have. Not to mention, we are certainly fulfilled with your sensational methods served by you. Some 4 areas on this page are certainly the simplest we have ever had.

  55. e cigarette health issues

    September 28, 2013

    Thank goodness for that unlimited texting feature, between me and my kids my texting is endless.

  56. Alishia Montaya

    September 29, 2013

    I have read several good stuff here. Definitely worth bookmarking for revisiting. I wonder how so much effort you set to create the sort of wonderful informative website.

  57. Lilia Veazey

    September 30, 2013

    You made some first rate points there. I regarded on the internet for the problem and located most individuals will go along with with your website.

  58. Howard Lepre

    September 30, 2013

    I loved as much as you’ll obtain performed proper here. The caricature is tasteful, your authored subject matter stylish. nonetheless, you command get got an nervousness over that you would like be turning in the following. in poor health indubitably come further beforehand again as exactly the similar nearly a lot often inside case you shield this hike.

  59. Ofelia Sinagra

    October 1, 2013

    Have you ever thought about including a little bit more than just your articles? I mean, what you say is valuable and everything. Nevertheless think about if you added some great visuals or videos to give your posts more, “pop”! Your content is excellent but with pics and videos, this blog could definitely be one of the best in its field. Fantastic blog!

  60. Holley Batto

    October 1, 2013

    of course like your web site however you have to test the spelling on several of your posts. Many of them are rife with spelling problems and I to find it very troublesome to tell the truth then again I’ll surely come again again.

  61. Cassaundra Goossens

    October 2, 2013

    Excellent blog! Do you have any tips for aspiring writers? I’m hoping to start my own blog soon but I’m a little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many options out there that I’m totally overwhelmed .. Any ideas? Bless you!

  62. Cyber Monday Macbook Air Special offers

    November 13, 2013

    i support herbal products because they are all natural and from what i know, they do not carry nasty side effects..