Skip to content

Exception : Unsupported ISO 3661 country: en (or xx) #31

@aaska

Description

@aaska

Describe your environment

  • react-native-localize version 1.0.1
  • react-native version 0.58.3
  • Target platform: Android
  • Device, simulator - not sure if this is even possible on real world devices
  • OS version - all
  • Android only: buildToolsVersion : 28.0.3

How to repeat issue and example

On an emulator, use the dev tool : "Custom locale" and pickup any locale without a script (ie: en, fr, de...) instead of those with a script.

image

When launching an app using RNLocalize, you get the following exception :

Unsupported ISO 3166 country: en
getInstance
    Currency.java:139
getCurrencyCode
    RNLocalizeModule.java:165
getExported
    RNLocalizeModule.java:197
getConstants
    RNLocalizeModule.java:74
getConstants
    JavaModuleWrapper.java:136
run
    NativeRunnable.java
handleCallback
    Handler.java:789
dispatchMessage
    Handler.java:98
dispatchMessage
    MessageQueueThreadHandler.java:29
loop
    Looper.java:164
run
    MessageQueueThreadImpl.java:192
run
    Thread.java:764


I've discovered the issue when using the Pre-release reports with localization testing on the play store.

Solution

Sorry, I'm not sure what would be the best solution... eventually to default it to the first occurence of a local with a script ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions