Span Locale

It is sometimes desirable for clauses to appear in a generated document having different locales applied to them. This can be done by adding the clause to a span and setting the locale as part of the span definition.
For example, consider payment dates in a multi-site template. We may have one clause for the English version of the template and another for the French version of the template:
[
Region Is "UK"
Payment will be made no later than {PaymentDate Format "dth MM yyyy"}]
[
Region Is "France"
Le paiement sera fait au plus tard {PaymentDate Format "dth MM yyyy"}]
However this does not cater for locale specific words such as month names in the specific languages (other than the system default). Using the Locale attribute on the span allows this:
[
Region Is "UK" Locale "en-GB"
Payment will be made no later than {PaymentDate Format "dth MM yyyy"}]
[
Region Is "France" Locale "fr-FR"
Le paiement sera fait au plus tard {PaymentDate Format "dth MM yyyy"}]
If there are computable variables that need to be used with various locales, the computation can be conditional upon the current locale. In this case, the current locale is detected by ThisLocale() function, which returns the locale code. See ThisLocale Function for more information.