You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Kent Johnson <kj...@transparent.com> on 2001/03/19 23:28:19 UTC
Tools for translating templates?
Hello,
I am building a site containing templates which must be localized.
The translators use tools that parse a file and pull out the words
and phrases that must be translated. The tools understand HTML but
not Velocity, so when the files come back the Velocity tags are
sometimes translated. For example $username becomes $nom de usario or
something like that.
So, the question is, does anyone have any techniques or tools that
help deal with this? For example, it would be great to be able to
convert a template into a well-formed HTML file that encapsulated all
the directives as comments, then back to a template. Or,
alternatively, a tool that finds all the localizable text and strips
that out to a formatted file.
What have other people done? Any hints, pointers, suggestions welcome.
(P.S. To be clear, I am NOT asking for help building a site that
supports localization, I have that. I am looking for ways to make the
translation of template files go more smoothly.)
Thanks,
Kent Johnson Transparent Language, Inc.
kjohnson@transparent.com http://www.transparent.com
Re: Tools for translating templates?
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Kent Johnson wrote:
>
> Hello,
>
> I am building a site containing templates which must be localized.
> The translators use tools that parse a file and pull out the words
> and phrases that must be translated. The tools understand HTML but
> not Velocity, so when the files come back the Velocity tags are
> sometimes translated. For example $username becomes $nom de usario or
> something like that.
>
> So, the question is, does anyone have any techniques or tools that
> help deal with this? For example, it would be great to be able to
> convert a template into a well-formed HTML file that encapsulated all
> the directives as comments, then back to a template. Or,
> alternatively, a tool that finds all the localizable text and strips
> that out to a formatted file.
>
> What have other people done? Any hints, pointers, suggestions welcome.
Take a look at the Perl regexp rules in our Convert utility - they are
used to convert WebMacro templates to velocity, so they may be a help in
converting Velocity to HTML w/ comments and back.
geir
--
Geir Magnusson Jr. geirm@optonline.net
Developing for the web? See http://jakarta.apache.org/velocity/
Re: Tools for translating templates?
Posted by Jon Stevens <jo...@latchkey.com>.
on 3/19/01 2:28 PM, "Kent Johnson" <kj...@transparent.com> wrote:
> Hello,
>
> I am building a site containing templates which must be localized.
> The translators use tools that parse a file and pull out the words
> and phrases that must be translated. The tools understand HTML but
> not Velocity, so when the files come back the Velocity tags are
> sometimes translated. For example $username becomes $nom de usario or
> something like that.
>
> So, the question is, does anyone have any techniques or tools that
> help deal with this? For example, it would be great to be able to
> convert a template into a well-formed HTML file that encapsulated all
> the directives as comments, then back to a template. Or,
> alternatively, a tool that finds all the localizable text and strips
> that out to a formatted file.
>
> What have other people done? Any hints, pointers, suggestions welcome.
In your case, you should centralize the strings which need localization out
of the actual HTML files and into another repository. Therefore, you will be
separating presentation (the HTML layer) from the content and the Velocity
layer.
thanks,
-jon
Re: Tools for translating templates?
Posted by Jon Stevens <jo...@latchkey.com>.
This is funny...this guy thinks that by s/WebMacro/Velocity/ he can ask as
many different lists as he wants in order to get someone to tell him the
right information (ie: do his job for him)...
<http://lists.semiotek.com/archives/webmacro/2001-March/004977.html>
Hey, don't abuse resources, it is rude. In fact, it is so rude that I refuse
to answer any more questions from you.
cya.
-jon
on 3/19/01 2:28 PM, "Kent Johnson" <kj...@transparent.com> wrote:
> Hello,
>
> I am building a site containing templates which must be localized.
> The translators use tools that parse a file and pull out the words
> and phrases that must be translated. The tools understand HTML but
> not Velocity, so when the files come back the Velocity tags are
> sometimes translated. For example $username becomes $nom de usario or
> something like that.
>
> So, the question is, does anyone have any techniques or tools that
> help deal with this? For example, it would be great to be able to
> convert a template into a well-formed HTML file that encapsulated all
> the directives as comments, then back to a template. Or,
> alternatively, a tool that finds all the localizable text and strips
> that out to a formatted file.
>
> What have other people done? Any hints, pointers, suggestions welcome.
>
> (P.S. To be clear, I am NOT asking for help building a site that
> supports localization, I have that. I am looking for ways to make the
> translation of template files go more smoothly.)
>
> Thanks,
> Kent Johnson Transparent Language, Inc.
> kjohnson@transparent.com http://www.transparent.com
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>