Hello!
I've been prototyping the TemplateTranslationTiein and now need to come
up with a syntax for the translation block in the templates.
There is a few parts that needs discussing:
1. Which keyword to use
2. How the context specification should look like
3. How optional arguments should look like.
In the prototype, it now looks like:
{tr "Hello #%nr (%nr2)" context "test" vars array( 'nr' => $nr2 + 8, 'nr2' =>
98 )}
As a comparison, eZ Publish now is:
{"Hello #%nr (%nr2)"|i18n("test", "comment", hash( '%nr', $nr2 + 8, '%nr2', 98
) )}
1. For the keyword, I can come up with a few options:
a. {_ "Hello..."
b. {t "Hello..."
c. {tr "Hello..."
2. For the context, I can only come up with one example actually:
a. context "contextName"
3. And for the arguments the following:
a. vars array( 'nr' => $nr2 + 8, 'nr2' => 98 )
b. vars 'nr' = $nr + 8, 'nr2' = 98
c. vars nr = $nr + 8, nr2 = 98
I think I'd prefer (for now), the following syntax:
{_ "Hello #%nr (%nr2)" context "test" vars nr = $nr + 8, nr2 = 98}
Some notes:
- The whole translation block should be slightly easy to find, in order
to create a script that can extract the template translation blocks.
- The "%nr" syntax is used for substitution variables based on the
Translation component
(http://ezcomponents.org/docs/api/2007.2.1/Translation_linguist-format.html#parameters)
Opinions, please!
regards,
Derick
--
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components