Skip to main content

isSupported method

bool isSupported (Locale locale)

<span class="feature">override</span>

<p>Whether resources for the given locale can be loaded by this delegate.</p> <p>Return true if the instance of <code>T</code> loaded by this delegate's <a href="../../utils_app_localization/AppLocalizationsDelegate/load.md">load</a> method supports the given <code>locale</code>'s language.</p>

Implementation

@override
bool isSupported(Locale locale) \{
Include all of your supported language codes here
return ['en', 'es', 'fr', 'hi', 'zh', 'de', 'ja', 'pt']
.contains(locale.languageCode);
\}