Skip to content

Commit 3797e1f

Browse files
authored
Update how-rms-matches-and-chooses-resources.md
1 parent 3ce40d0 commit 3797e1f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

uwp/app-resources/how-rms-matches-and-chooses-resources.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@ ms.localizationpriority: medium
1010
# How the Resource Management System matches and chooses resources
1111
When a resource is requested, there may be several candidates that match the current resource context to some degree. The Resource Management System will analyze all of the candidates and determine the best candidate to return. This is done by taking all qualifiers into consideration to rank all of the candidates.
1212

13-
In this ranking process, the different qualifiers are given different priorities: language has the greatest impact on the overall ranking, followed by contrast, then scale, and so on. For each qualifier, candidate qualifiers are compared with the context qualifier value to determine a quality of match. How the comparison is done depends upon the qualifier.
13+
In this ranking process, the different qualifiers are given different priorities: language has the greatest impact on the overall ranking, followed by contrast, then scale, and so on. For each qualifier, candidate qualifiers are compared with the context qualifier value to determine the quality of the match. How the comparison is made depends upon the qualifier.
1414

1515
For specific details on how language tag matching is done, see [How the Resource Management System matches language tags](how-rms-matches-lang-tags.md).
1616

1717
For some qualifiers, such as scale and contrast, there is always some minimal degree of match. For example, a candidate qualified for "scale-100" matches a context of "scale-400" to some small degree, albeit not as well as a candidate qualified for "scale-200" or (for a perfect match) "scale-400".
1818

19-
For other qualifiers, however, such as language or home region, it is possible to have a non-match comparison (as well as degrees of matching). For example, a candidate qualified for language as "en-US" is a partial match for a context of "en-GB", but a candidate qualified as "fr" is not a match at all. Similarly, a candidate qualified for home region as "155" (Western Europe) matches a context for a user with a home region setting of "FR" somewhat well, but a candidate qualified as "US" does not match at all.
19+
For other qualifiers, however, such as language or home region, it is possible to have a non-match comparison (as well as degrees of matching). For example, a candidate qualified for language as "en-US" is a partial match for a context of "en-GB", but a candidate qualified as "fr" is not a match at all. Similarly, a candidate qualified for the home region as "155" (Western Europe) matches a context for a user with a home region setting of "FR" somewhat well, but a candidate qualified as "US" does not match at all.
2020

2121
When a candidate is evaluated, if there is a non-match comparison for any qualifier, then that candidate will get an overall non-match ranking and will not be selected. In this way, the higher-priority qualifiers can have the greatest weight in selecting the best match, but even a low-priority qualifier can eliminate a candidate due to a non-match.
2222

2323
A candidate is neutral in relation to a qualifier if it is not marked for that qualifier at all. For any qualifier, a neutral candidate is always a match for the context qualifier value, but only with a lower quality of match than any candidate that was marked for that qualifier and has some degree of match (exact or partial). For example, if we have candidates qualified for "en-US", "en", "fr", and also a language-neutral candidate, then for a context with a language qualifier value of "en-GB", the candidates will be ranked in the following order: "en", "en-US", neutral, and "fr". In this case, "fr" does not match at all, while the other candidates match to some degree.
2424

25-
The overall ranking process begins by evaluating candidates in relation to the highest-priority qualifier, which is language. Non-matches are eliminated. The remaining candidates are ranked in relation to their quality of match for language. If there are any ties, then the next-highest-priority qualifier, contrast, is considered, using the quality of match for contrast to differentiate among tied candidates. After contrast, the scale qualifier is used to differentiate remaining ties, and so on through as many qualifiers as are needed to arrive at a well-ordered ranking.
25+
The overall ranking process begins by evaluating candidates in relation to the highest-priority qualifier, which is language. Non-matches are eliminated. The remaining candidates are ranked in relation to their quality of match for language. If there are any ties, then the next-highest-priority qualifier, contrast, is considered, using the quality of match for contrast to differentiate among tied candidates. After contrast, the scale qualifier is used to differentiate remaining ties, and so on, through as many qualifiers as are needed to arrive at a well-ordered ranking.
2626

27-
If all candidates are removed from consideration due to qualifiers that don't match the context, the resource loader goes through a second pass looking for a default candidate to display. Default candidates are determined during creation of the PRI file and are required to ensure there is always some candidate to select for any runtime context. If a candidate has any qualifiers that don't match and aren't a default, that resource candidate is thrown permanently out of consideration.
27+
If all candidates are removed from consideration due to qualifiers that don't match the context, the resource loader goes through a second pass, looking for a default candidate to display. Default candidates are determined during the creation of the PRI file and are required to ensure there is always some candidate to select for any runtime context. If a candidate has any qualifiers that don't match and aren't a default, that resource candidate is thrown permanently out of consideration.
2828

2929
For all the resource candidates still in consideration, the resource loader looks at the highest-priority context qualifier value and chooses the one that has the best match or best default score. Any actual match is considered better than a default score.
3030

31-
If there is a tie, the next-highest priority context qualifier value is inspected and the process continues, until a best match is found.
31+
If there is a tie, the next-highest priority context qualifier value is inspected, and the process continues until the best match is found.
3232

3333
## Example of choosing a resource candidate
3434
Consider these files.
@@ -51,7 +51,7 @@ Scale: 400
5151
Contrast: Standard
5252
```
5353

54-
The Resource Management System eliminates three of the files, because high contrast and the German language do not match the context defined by the settings. That leaves these candidates.
54+
The Resource Management System eliminates three of the files because high contrast and the German language do not match the context defined by the settings. That leaves these candidates.
5555

5656
```console
5757
en/images/logo.scale-400.jpg

0 commit comments

Comments
 (0)