250+ TOP MCQs on Internationalization (I18n) Message Properties and Storage Properties and Answers

Java Spring Test on “Internationalization (I18n) Message Properties and Storage Properties”.

1. Grails applications are equipped to support internationalization.
a) True
b) False
Answer: a
Clarification: 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
Answer: b
Clarification: 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
Answer: a
Clarification: 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.

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
Answer: c
Clarification: 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
Answer: a
Clarification: 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.

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

Answer: a
Clarification: 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
Answer: a
Clarification: JSP page first imports the Groovy tag library and later declares statements using the Groovy g:message tag.

8. Tag can also be used in GSP pages views.
a) g:message
b) g:string
c) g:msg
d) none of the mentioned
Answer: a
Clarification: 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
Answer: a
Clarification: Grails is designed to use a RDBMS as a permanent storage system.

10. Grails comes preconfigured to use:-
a) MySql
b) PostgreSQL
c) Access
d) HSQLDB
Answer: d
Clarification: 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
Answer: b
Clarification: 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

Answer: c
Clarification: 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
Answer: a
Clarification: 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
Answer: a
Clarification: 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
Answer: c
Clarification: dataSource properties for configuring a RDBMS.:-
logSql Indicates whether to enable SQL logging


Java Spring for various tests,

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top