8 Replies
      Latest reply on Sep 15, 2019 5:14 AM by Claude31
      otacon85 Level 1 Level 1 (0 points)

        I have made an iOS 13 app with a watch extension. The app is written in English. I have localized it to German. Everything is fine with the iPhone app; however the watch extension is only available in English. The German localization is not loaded.

         

        When I list the available localizations by printing1 like so:

        print(Bundle.main.localizations)

        the iPhone app gives me:

        ["en", "Base", "de"]

        which is fine for me, but the Watch Extension only lists:

        ["en"]

        which isn't correct – "de" is missing.

         

        I have added German as a localization in the Interface Builder (Interface Builder Languages Screenshot) but that doesn't seem to work.

        I have also tried removing the German localization completely from the project and adding it back – didn't work either. (Localization screenshot with German localization enabled)

         

        What am I missing?

         

        Any help is appreciated. Thank you very much.

        1 I know that printing to the console is obsolete, you should use oslog instead, but I haven't gotten around to that yet, to be honest.

        • Re: Localization of Watch Extension is missing
          Claude31 Level 8 Level 8 (6,515 points)

          Do you test on watch itself or on simulator ?

           

          Localization is not missing but does not work on simulator.

           

          I use a workaround trick when I need to test:

          - first make a complete backup of the project !

          - I have files for -en; -de, -fr (for instance) : localizable.strings and interface.strings at least

          - for each -en file, I comment out the whole file content and paste at the end the complete copy of the -de file

          - then I run and get the -de localization

          - once completed, I have jeust a few undo to perform in each -en file

            • Re: Localization of Watch Extension is missing
              otacon85 Level 1 Level 1 (0 points)

              Hi Claude,

               

              thank you for your effort.

               

              Unfortunately, I am alredy testing both in the simulator and on a device (Series 4). My problem is the same in both instances.

               

              Hm. But thank you for that hint, I will now only test on the watch.

               

              Otacon

                • Re: Localization of Watch Extension is missing
                  Claude31 Level 8 Level 8 (6,515 points)

                  I have an app extension running on watch, localized in french, spanish and english, works OK. So that's probably something in your configuration. Hard to say with information we get.

                   

                  Have you checked if any of the 2 work:

                  - interface.strings localization

                  - localizable.strings

                    • Re: Localization of Watch Extension is missing
                      otacon85 Level 1 Level 1 (0 points)

                      That's interesting – that you have a working project.

                       

                      I have made a new project, using the current (first) Xcode 11 GM, this time on macOS Mojave, last time on macOS Catalina, put a label on the canvas, added the localization – and it doesn't work, neither in the simulator (6.0) nor on my physical Watch (5.3.1). I've also put a label on the canvas of the iPhone app, and it's translation does work fine.

                       

                      Maybe I've made some kind of stupid mistake… I go over it over and over, but I can't find one.

                       

                      I'm really losing sleep over this.

                       

                      I have now filed a radar, but I do hope, it's not my mistake.