Open kmelmon opened 4 years ago
@chrisglein @kmelmon I have some experience with localization, so please assign me to this issue - I'll see what I can do.
@kmelmon I've been searching for a localization mechanism in both react-native-windows and react-native and couldn't find any. Is the localization even supported? If it is then could you point me the native implementation of Alert for iOS which the comment mentions?
@kmelmon Kind reminder: Is there a localization even supported in the React Native Windows, or React Native?
@chrisglein Can you (or a team in general) take a look at this issue? Does the RN or RNW support the localization?
https://docs.microsoft.com/en-us/windows/uwp/app-resources/localize-strings-ui-manifest would be a good reference for string resources on the system level.
I don't think there's an exposed RN specific localization framework. For most components I think strings are handled app-level, or by the built-in component.
This should call through to native, not use anything RN specific. We don't today have localized resources for RNW. The first time we need to do that it'll have some definite startup cost. However if it exists in XAML or somewhere in the system then we should be able to pull in an existing localization (which for 'OK' should already exist).
In the windows implementation of Alert, we currently have 'OK' hard-coded in English in the javascript. This should be localized. iOS does this on the native side, we should probably copy this pattern.
See vnext/src/libraries/alert/alert.windows.js