Spring Questions and Answers – Internationalization (I18n) Message Properties and Storage Properties

This set of Java Spring Test focuses on “Internationalization (I18n) Message Properties and Storage Properties”.

1. Grails applications are equipped to support internationalization.
a) True
b) False
View Answer

Answer: a
Explanation: By default, all Grails applications are equipped to support internationalization.

2. Where can you find series of *.properties files.
a) /grails-app/
b) /grails-app/i18n/
c) /grails-app/i18n/WEB-INF
d) /grails-app/i18n/WEB-APP
View Answer

Answer: b
Explanation: Inside an application /grails-app/i18n/ folder, you can find series of *.properties files used to define messages in 12 languages.

3. *.properties files allow Grails applications to display messages.
a) True
b) False
View Answer

Answer: a
Explanation: The values declared in these *.properties files allow Grails applications to display messages based on a user’s languages preferences or an application default language.
advertisement
advertisement

4. Which locale (i.e., from an internationalization properties file) to use for a user is based on?
a) /grails-app/conf/spring/resource.groovy file
b) user’s browser language preferences
c) all of the mentioned
d) none of the mentioned
View Answer

Answer: c
Explanation: Grails determines which locale (i.e., from an internationalization properties file) to use for a user based
on two criteria:
• The explicit configuration inside an application /grails-app/conf/spring/
resource.groovy file
• A user’s browser language preferences

5. There is no default configuration present in an application resource.groovy file.
a) True
b) False
View Answer

Answer: a
Explanation: Since the explicit configuration of an application locale takes precedence over a user’s browser language preferences, there is no default configuration present in an application resource.groovy file.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. If you want to coerce users into using a specific language locale.
a) /grails-app/conf/spring/resource.groovy file
b) /grails-app/resource.groovy file
c) /grails-app/spring/resource.groovy file
d) none of the mentioned
View Answer

Answer: a
Explanation: You should define an explicit configuration inside an application /grails-app/conf/spring/resource.groovy file, only if you want to coerce users into using a specific language locale.

7. JSP Tag which declares statements using the Groovy.
a) g:message
b) g:string
c) g:msg
d) none of the mentioned
View Answer

Answer: a
Explanation: JSP page first imports the Groovy tag library and later declares statements using the Groovy g:message tag.
advertisement

8. Tag can also be used in GSP pages views.
a) g:message
b) g:string
c) g:msg
d) none of the mentioned
View Answer

Answer: a
Explanation: The g:message tag can also be used in GSP pages views, but note that it’s not necessary to import the tag library explicitly, since it’s available by default on all Grails GSP pages.

9. Grails uses RDBMS as a permanent storage system.
a) True
b) False
View Answer

Answer: a
Explanation: Grails is designed to use a RDBMS as a permanent storage system.
advertisement

10. Grails comes preconfigured to use:-
a) MySql
b) PostgreSQL
c) Access
d) HSQLDB
View Answer

Answer: d
Explanation: HSQLDB is a database that is automatically started by Grails upon deploying an application (i.e., executing grails run-app).

11. HSQLDB is a non-volatile database.
a) True
b) False
View Answer

Answer: b
Explanation: Every time an application is restarted in development and testing environments, HSQLDB loses all its data since it’s configured to operate in memory.

12. Configure Grails to use another RDBMS by modifying:-
a) Data.groovy
b) DataSource.groovy
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: You can configure Grails to use another RDBMS by modifying an application DataSource.groovy file, located under the grails-app/conf directory.

13. Grails relies on the standard Java JDBC notation to specify RDBMS.
a) True
b) False
View Answer

Answer: a
Explanation: Grails relies on the standard Java JDBC notation to specify RDBMS connection parameters, as well as on the corresponding JDBC drivers provided by each RDBMS vendor, to create, read, update, and delete information.

14. DataSource properties, Class name for the JDBC driver.
a) driverClassName
b) dataSource properties
c) all of the mentioned
d) none of the mentioned
View Answer

Answer: a
Explanation: dataSource properties for configuring a RDBMS.:-
driverClassName Class name for the JDBC driver

15. Indicates whether to enable SQL logging.
a) driverClassName
b) dataSource properties
c) logSql
d) none of the mentioned
View Answer

Answer: c
Explanation: dataSource properties for configuring a RDBMS.:-
logSql Indicates whether to enable SQL logging

Sanfoundry Global Education & Learning Series – Java Spring.
To practice all areas of Java Spring for various tests, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.