# matches abstract method

bool matches(

1. Locale other, {
2. bool ignoreVariant = true,

})

Check if this locale matches another (optionally ignoring variant).

This method performs a flexible comparison between locales, allowing you to ignore the variant component for broader matching. Useful for finding compatible locales in internationalization scenarios.

Parameters:

- `other`: The locale to compare against
- `ignoreVariant`: Whether to ignore variant differences (default: true)

Example:

    final locale1 = Locale('en', 'US', 'POSIX');
    final locale2 = Locale('en', 'US', 'UTF8');
    final locale3 = Locale('en', 'CA');

    // Matches ignoring variant (default)
    print(locale1.matches(locale2)); // Output: true

    // Exact match including variant
    print(locale1.matches(locale2, ignoreVariant: false)); // Output: false

    // Different countries don't match
    print(locale1.matches(locale3)); // Output: false

## Implementation

    bool matches(Locale other, {bool ignoreVariant = true});