Demonstrate how to build SuiteApps to support internationalization and localization. Flashcards

1
Q

What is the purpose of the N/currency module?

A

We can use it to find the exchange rate between 2 currencies based on a certain date

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

Using the nCurrency.exchangeRate(options) function in N/currency module, what are the 3 ‘options’ parameters?

A

◦ source: The original currency
◦ target: The target currency
◦ date: The date the currency exchange should take place

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

What are the 2 main purposes of the N/format module?

A

We can format strings into a specified format

We can parse formatted dates into strings

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

The N/format/i18n module is used for what 4 main purposes?

A
  • Formatting of strings in international context
  • Formatting of numbers to currency or number strings
  • Formatting of phone numbers to strings
  • Parsing of strings to phone numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the nFormat.getCurrencyFormatter(options) function do?

A

Creates an nFormat.CurrencyFormatter object to format numbers into currency strings

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

What are the 2 options of the nFormat.getCurrencyFormatter(options) function

A

▪ currency: Code of the currency that is used by formatter
▪ locale: Code of the locale that is used by formatter

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

What does the nFormat.getNumberFormatter(options) function do?

A

Creates an nFormat.NumberFormatter object to format numbers into strings.

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

What are the 5 options in the nFormat.getNumberFormatter(options) function?

A

▪ groupSeparator:
▪ decimalSeparator
▪ precision
▪ negativeNumberFormat
▪ locale: Indicates the locale from which default settings are determined

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

True or False?

The locale option in the nFormat.getNumberFormatter(options) function, can be overridden by the other 4 options in the function.

A

True.

The locale determines the formatting of numbers.

E.G. 1.5 in the UK would be 1,5 in France. They use a comma to denote a decimal instead of a point.

This can be overridden by the other options because they specify what to use in those instances.

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

What does the nFormat.spellOut(options) function do, and what are the options parameters?

A

Spells out positive and negative number as a string in a specific language.

Options are:
▪ number
▪ locale: language code

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

What does the nFormat.getPhoneNumberParse(options) function do, and what are the options parameters?

A

Create nFormat.PhoneNumberParser object to parse the string with the phone number to an object.

Options are:
▪ defaultCountry

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

What is the purpose of the N/recordContext module?

A

Used to get all the available context types of the record, such as localization

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

Using the N/recordContext module, what does the localisation context type indicate?

A

The localization context type indicates which country a script is using for execution

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

When SDFing, to make the object only run for records with a specific localization context, we must do what 2 things?

A

▪ Specify the name of the country in the localizationcontext field in the XML definition

▪ Set the alllocalizationcontexts field in the XML definition to “F”

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

What is one good thing we can do with the logic of a script using the N/recordContext module?

A

Can be used to create conditional statements within a script so that the script behaves differently based on the context.

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

Utilising the N/recordContext module, what are the 3 options for the nRecordContext.getContext(options) function?

A

▪ recordType
▪ recordId
▪ contextTypes

17
Q

What does the N/translation module allow SuiteScript developers to do?

A

The N/translation module lets SuiteScript developers interact with NetSuite Translation Collections programmatically.