<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Kristof,<br>
i have done a lot of research on vTiger 5.03 to be able to change a lot
of german strings that had to be changed manually to get into the right
order, if you are interested i could get those of them that i
documented back then out from somewhere within my vtiger docus and pass
it over?<br>
<br>
Best Regards<br>
Torsten Zenk<br>
<br>
Kristóf KOVÁCS schrieb:
<blockquote
 cite="mid:e4de77a90812021418s19af3c66i535049a95026834c@mail.gmail.com"
 type="cite">
  <pre wrap="">Hello Tigers,
Please see the following patch:
<a class="moz-txt-link-freetext" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5404">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5404</a>

It's decidedly only a start (a full overhaul in one patch would be
unrealistic -- the code would change a lot while one finds
all occurrences of such language constructs), but if this Smarty function is
accepted into the vTiger core, we will start and gradually find all places
where our supported languages require different word orders, and change the
templates.

Those changesets will be sent in as patches, too, as translation goes
forward.

Kristof

On Mon, Nov 24, 2008 at 4:34 PM, Kristóf KOVÁCS &lt;
<a class="moz-txt-link-abbreviated" href="mailto:kristof.kovacs@onlineprojects.hu">kristof.kovacs@onlineprojects.hu</a>&gt; wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,
Smarty is theoretically extensible, I'm thinking about using
Smarty.register_function(...), not hacking into the Smarty base, of course.
:)

Maybe something more general like

{vtiger_translate $APP.ADD_NEW $APP.Contact}

and

'Contact' =&gt; 'Contact',
'ADD_NEW' =&gt; 'Add %s',

'Contact' =&gt; 'Kontakt',
'ADD_NEW' =&gt; '%s Hinzufügen',

What would you think?

(In the process, introducing new context based (not reused) keys is also a
must-have, just as you say.)

Kristóf

On Mon, Nov 24, 2008 at 4:25 PM, Prasad <a class="moz-txt-link-rfc2396E" href="mailto:prasad@vtiger.com">&lt;prasad@vtiger.com&gt;</a> wrote:

    </pre>
    <blockquote type="cite">
      <pre wrap="">Hi Kristof,

I would suggest not adding too much hack to any Smarty functions it will
pose difficulty to upgrade the library later.

Coming up with context based language keys is a way to go (as I can think
of now).
We need to clean up TPL files in the beginning and add required language
translation key this will make sure other
language translators put in proper values based on the context.

Regards,
Prasad
vtiger Team


On 11/24/08, Kristóf KOVÁCS <a class="moz-txt-link-rfc2396E" href="mailto:kristof.kovacs@onlineprojects.hu">&lt;kristof.kovacs@onlineprojects.hu&gt;</a> wrote:
      </pre>
      <blockquote type="cite">
        <pre wrap="">Hello Prasad,
thanks for your answer! Of course, I don't wish to force a language
cleanup on your team. :) I'm merely thinking about developing the
foundation, the infrastructure for such a change, and then, I hope,
individual translators of different languages would do the modifications in
both the TPL and the language files. I would certainly do our own part,
Hungarian translation requires different word order at several places.

But I want to discuss the concepts with you guys, since for such a
change, it requires consensus (I also would like to hear opinions from
veteran translators of the project). Also it would be very bad if our
development tree would diverge from yours, both in terms of maintenance (for
us), and in opportunity lost (for everybody).

Prasad, we all know and trust you as one of the best core developers, so
just one question: what do You say, just from the top of your head, would
there be any better solution for the problem, or should we go think forward
with the "added-Smarty-printf-function" solution? (Would you accept into the
codebase the patches we would be starting to send in of modified TPL files
and language files?)

Kristóf

On Mon, Nov 24, 2008 at 3:52 PM, Prasad <a class="moz-txt-link-rfc2396E" href="mailto:prasad@vtiger.com">&lt;prasad@vtiger.com&gt;</a> wrote:

        </pre>
        <blockquote type="cite">
          <pre wrap="">Hi Kristof,

This issues has been brought up earlier as well. To make the translation
clean up all-over the product it could
take more effort both in terms of development and validation. Currently
we are focusing on getting in new features
as we go along we can better plan for language cleanup's as well. This
give us more focused work items.

We would appreciate community help in identifying such language or
translation issues.

Regards,
Prasad

On 11/24/08, Kristóf KOVÁCS <a class="moz-txt-link-rfc2396E" href="mailto:kristof.kovacs@onlineprojects.hu">&lt;kristof.kovacs@onlineprojects.hu&gt;</a> wrote:

          </pre>
          <blockquote type="cite">
            <pre wrap="">Hello Tigers,
I was talking with Dávid of CafeOpen about vTiger translations, and
there is one issue which my team often faces with, and this is word order.
Let me illustrate it with an example (using German instead of Hungarian to
make it more clear, but the concept is the same).

For example, in ActivityEditView.tpl there is the following code:

&lt;input title="{$APP.LBL_ADD_NEW} {$APP.Contact}" .....

And this shows a button called "Add Contact". It seems all well since
"$APP.LBL_ADD_NEW" is "Add" and "$APP.Contact" is "Contact".

But "Add Contact" in German is "Kontakt hinzufügen" (notice that the
words are in a different order). Now we have a problem since
"{$APP.LBL_ADD_NEW} {$APP.Contact}" can not be forced to display this, and
saying "hinzufügen Kontakt" does not sound quite right (it sounds very bad
indeed).

Translation quirks can circumvent some of such problems (one could
write "Neue Contact"), but often these strings are reused at other parts of
the code, and fixing it in one place often destroys grammar at other places.

One idea would be to use printf()-like format strings to correct such
issues, even if it may require an introduction of a now Smarty function. I'm
thinking along the lines of something like this:

{a_smarty_printf_function
$APP.ADD_NEW_SOMETHING_FORMATSTRING, $APP.LBL_ADD_NEW, $APP.Contact}

Then, in english, the .lang file would read:
[...]
'LBL_ADD_NEW' = 'Add',
'Contact' =&gt; 'Contact',
'ADD_NEW_SOMETHING_FORMATSTRING' =&gt; "'%s %s", // Very simple format
string, no surprise here
[...]

And in german, it would be:
[...]
'LBL_ADD_NEW' = 'Hinzufügen',
'Contact' =&gt; 'Kontakt',
'ADD_NEW_SOMETHING_FORMATSTRING' =&gt; "'%2$s %1$s", // Notice how I used
"1$" and "2$" to access arguments in different order
[...]

I don't feel it elegant enough (but more elegant than the original), so
comments, suggestions, ideas, better solutions are very much welcome. Please
all brainstorm this ever the next coffee. :o)

Kristóf

_______________________________________________
Reach hundreds of potential candidates - <a class="moz-txt-link-freetext" href="http://jobs.vtiger.com">http://jobs.vtiger.com</a>

            </pre>
          </blockquote>
          <pre wrap="">
_______________________________________________
Reach hundreds of potential candidates - <a class="moz-txt-link-freetext" href="http://jobs.vtiger.com">http://jobs.vtiger.com</a>

          </pre>
        </blockquote>
        <pre wrap="">
_______________________________________________
Reach hundreds of potential candidates - <a class="moz-txt-link-freetext" href="http://jobs.vtiger.com">http://jobs.vtiger.com</a>

        </pre>
      </blockquote>
      <pre wrap="">
_______________________________________________
Reach hundreds of potential candidates - <a class="moz-txt-link-freetext" href="http://jobs.vtiger.com">http://jobs.vtiger.com</a>

      </pre>
    </blockquote>
    <pre wrap="">
    </pre>
    <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Reach hundreds of potential candidates - <a class="moz-txt-link-freetext" href="http://jobs.vtiger.com">http://jobs.vtiger.com</a> </pre>
  </blockquote>
</blockquote>
</body>
</html>