Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19566

Ti.Locale.currentLanguage returns locale on iOS 9

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 5.0.0
    • Fix Version/s: Release 5.2.0
    • Component/s: iOS
    • Labels:
    • Environment:

      SDK 5.0.0.GA
      iOS 8.4
      iOS 9.0

    • Story Points:
      2
    • Sprint:
      2015 Sprint 20 SDK

      Description

      Since iOS 9 the same Titanium SDK returns a different value for Ti.Locale.currentLanguage. It now returns the full locale instead of just the language:

      app.js

      console.log('currentLanguage ' + Ti.Locale.currentLanguage);
      console.log('currentCountry ' + Ti.Locale.currentCountry);
      console.log('currentLocale ' + Ti.Locale.currentLocale);
      

      iOS 8.4

      [INFO]  currentLanguage en
      [INFO]  currentCountry US
      [INFO]  currentLocale en-US
      

      iOS 9

      [INFO]  currentLanguage en-US
      [INFO]  currentCountry US
      [INFO]  currentLocale en-US
      

      Code

      Found by Q&A user
      https://community.appcelerator.com/topic/3430/ti-locale-getcurrentlanguage-on-ios-9-returns-en-us-instead-en

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                apetkov Angel Petkov
                Reporter:
                fokkezb Fokke Zandbergen
                Reviewer:
                Pedro Enrique (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20391
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code