11. Understanding internationalization Flashcards

1
Q

With Struts, how can you make a resource bundle for different languages?

A

PageName_en.properties

Next to your page, put a properties file that’s named PageName_locale.

within the file place ‘property=value’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What tag do you use to display text from your resource bundle?

A

text name=”propertyValue”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How can you pull bundle text with OGNL?

A

Use the getText(‘property.name’) method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you provide text from a bundle in a validator message (web.xml), rather than a string literal?

A

Use the key attribute for the message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can you parameterize your localization text?

A

property.value=Hello {0}

Then when putting it on the page you just pass a param, the first one will replace the {0}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly