Accessibility language - Flutter
With Flutter, the locale
parameter of Text
or TextSpan
can be used to specify the locale for a piece of text. Multiple TextSpan
elements can be combined to speak content in multiple languages.
/// Text implementation
Text(
'Appt',
locale: Locale.fromSubtags(languageCode: 'nl'),
);
/// TextSpan implementation
TextSpan(
text: 'Appt',
locale: Locale.fromSubtags(languageCode: 'nl'),
);