Please enable JavaScript to view this site.

 

Navigation: Languages > Languages and Translations > Token Translations

Supplying translations for Ordinal Tokens

Scroll Prev Up Next More
The translations of the shortened ordinal tokens deserves special mention, as there is a time-saving method of supplying a translation for each possible value.

 

In principle, there is no limit to the range of the values to which the "."prefix can apply to. However, this prefix is usually applied to the tokens [d], [q] and sometimes [w], and this means that, in practice, the range of possible values is 1-53.

 

Even so, supplying 53 translations per language can be a bit tedious, mostly as many of these translations repeat themselves in the case of the shortened ordinal token.

 

Since there are many repeated values for this ordinal token, you can set the default value as the value of index 0, and then only specify the non-default values.

In the above example, we know that apart from the values for 1, 2, 3, 21, 22, 23, 31, 32, 33, 41, 42, 43, 51, 52, 53, this token will always convert to "th". Therefore we have set the value for 0 as "th" and we only need to set the values of the exceptions.

 

Ordinals beyond 100

 

If you ever need to specify ordinal text for numerical values over 100 (for example 355 in the case of a [.t+] token) you do not need to specify values for indices over 100, as Q++Studio treats values of ordinal tokens taking into account only the last 2 digits.

 

So, for example, in the case of 355, Q++Studio would look for an index value of 55 and, as seen above, if a value for 55 is not found it will look for a default value at index position 0, which is "th". But, for 232, it would look for an index value of 32, and therefore use "nd".

 


Topic 108851, last updated on 17-Apr-2020