SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 229 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


Sometimes, we don't need to write any code at all, as the next section shows.
Using Localized Templates
Many applications have pages with significant textual content and very few
components on them, if any. These can be pages with legal information, terms and
conditions and so on. Internationalizing such pages paragraph by paragraph, placing
all text into message catalogs, doesn't sound like a good idea. Fortunately, Tapestry
has an alternative solution for this purpose??”localized templates.
Let's add yet another page to the application, and this one will be extremely simple.
First add a new empty class to the package containing all the other page classes and
name it Terms.
Next, add to the application two new templates, one of them named Terms.tml,
another one Terms_de.tml. In real life we would put some lengthy English text into
the Terms.tml file while its German translation would go into the Terms_de.tml.
However to save space, we'll make the content of these files very simple, just enough
to see that they are different. This is what Terms.tml might look like:


Terms and Conditions


Miscellaneous terms and conditions can be found
here.


Pages:
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241

Organizacja imprez agencja interaktywna Warszawa Wyprawki i akcesoria niemowlęce, pi pozycjonowanie serwisu Avast