How to translate a custom block in multiple languages?
I have a custom made block which is working fine but my issue is I want to translate it to other language, actually I wanted in 2 languages
Right now block is in english which is working fine, but now I also wanted that in danish for this i have a url with /dk/ where all page is in danish else then my block, So for my block I have made the languages folder inside the block folder like this : blockname/languages/da_DK/LC_MESSAGES/messages.po and messages.mo but still it is not working. The block language is not getting translated. I am not sure what am I doing wrong. So can anyone please guide me that how can I solve it.
For translating the interface to the block, you need some of the translations experts to help you configure. This howto would be a good starting point:
Thanks for your reply.
The link you gave which have the t('') tags around string , in my block i already have it. But my issue is my block contains the language folder of the danish language but the language is not getting translated, So cant we use the language folder inside block? For say example my block name is calculator now i have the language folder in it : blocks/calculator/languages/da_DK/LC_MESSAGES/messages.po ( and messages.mo) files in it. But why does my blocks strings are not getting translated? Please help to get me the solution for it.
you can't put translation files in a block directory. Instead you can add site specific translations like described here:http://www.concrete5.org/documentation/how-tos/developers/translati...
Thats what i really wanted to know , Thanks for your reply. Fornow i have made package and used block inside it.