Translate strings : management method

Permalink
Hi everybody, Hi team,

I'm working on an international website and I need to translate website in 5 languages.

I use internationalization addon which is so cool to manage website structure and logics.

Now, I need to translate string t() contains in my theme, blocks and packages.

I found 2 solutions for that but I don't know which one I need to use:
1/http://www.concrete5.org/documentation/developers/system/localizati...
2/ Create "site" folder in the "languages" folder

As you said, site folder is for site interface.
OK but in languages/xx_XX/LC_MESSAGES/message.po there are strings used in blocks and themes too ... !? Yes they are core specific but it's hard to understand and could be cool if there can have only one file for each languages.

Or change the logic :
message.po = dashboard
site/xx_XX = site

Could you explain more about that and the reasons of this choice ?

Thank you in advance.

Best,

moosh

moosh
 
moosh replied on at Permalink Reply
moosh
Little up:-)
Mainio replied on at Permalink Reply
Mainio
And to open up the discussion even further:
I think the main issue (at least for me) is how the Internationalization add-on works - it doesn't include the core translations when browsing the site. However, there are texts in blocks as well that the core translations include, like the "Submit" button name in the form block.

Now, if you have a site in French and you don't have the "Submit" text anywhere on your site specific translation, that text will still show as "Submit" because the Internationalization does not include the core translation files.

I'd also love to hear some explanation on this and what are the reasons for the current functionality. I even have suggested a pull request for the Internationalization add-on to solve this particular issue but it was rejected without any comments or explanation:
https://github.com/concrete5/addon_internationalization/pull/1/...

However, to this thread specifically: I would myself like to keep the site and system translations separated from each other as it currently is. The only problem for me is what is explained above.


Antti / Mainio
Mainio replied on at Permalink Reply
Mainio
And one more thing that is bugging me with the whole internationalization/localization issue is that you can actually have some specific text appear in different contexts with different meanings.

Let's take an example:
- I have two pages named "Present your skills" and "Events"
- On page named "Present your skills" I have a form with bunch of fields and then a button where it states "Present" - This means that by filling this form, you're able to present your skills to others
- On page named "Events" I have listing of events and on the very top of the page I have a static sub-heading reading "Present" - This means the events that are happening right now.

Might not be the best example but just to show you an example of this situation. And I know there are workarounds but again, this is an example case. In Finnish we would translate the word as "Esitä" on the first situation and "Tällä hetkellä" on the second situation which are completely different words.

If this word was translated in the .po files, it would only appear once in the .po-files and have code references to different places. The .po-file format also allows declaring translation context with the "msgctxt" identifier which could solve this issue.

This is specified as follows, e.g. in the first case:
msgctxt "Events"
msgid "Present"
msgstr "Esitä"


Supporting this would also be useful in C5...