Language update on background while asking upfront












-2















I am pretty sure that my questions is impossible but I thought lets give it a shot.



I have a multi language app, and I change the language based on users device. However I was wondering if it is possible to ask the user first about their language preference and then load the language preferably in the background ( which seems like not possible.) I am open to suggestions.



One thing that crossed my mind was this, onStart of the firstpage I'd ask the language, save the user preference and load the content, but I am not sure if it is gonna be in the background or runtime.










share|improve this question



























    -2















    I am pretty sure that my questions is impossible but I thought lets give it a shot.



    I have a multi language app, and I change the language based on users device. However I was wondering if it is possible to ask the user first about their language preference and then load the language preferably in the background ( which seems like not possible.) I am open to suggestions.



    One thing that crossed my mind was this, onStart of the firstpage I'd ask the language, save the user preference and load the content, but I am not sure if it is gonna be in the background or runtime.










    share|improve this question

























      -2












      -2








      -2








      I am pretty sure that my questions is impossible but I thought lets give it a shot.



      I have a multi language app, and I change the language based on users device. However I was wondering if it is possible to ask the user first about their language preference and then load the language preferably in the background ( which seems like not possible.) I am open to suggestions.



      One thing that crossed my mind was this, onStart of the firstpage I'd ask the language, save the user preference and load the content, but I am not sure if it is gonna be in the background or runtime.










      share|improve this question














      I am pretty sure that my questions is impossible but I thought lets give it a shot.



      I have a multi language app, and I change the language based on users device. However I was wondering if it is possible to ask the user first about their language preference and then load the language preferably in the background ( which seems like not possible.) I am open to suggestions.



      One thing that crossed my mind was this, onStart of the firstpage I'd ask the language, save the user preference and load the content, but I am not sure if it is gonna be in the background or runtime.







      android






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 17:02









      Kamyar ZiabariKamyar Ziabari

      1




      1
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Before answering your question lets take some factors into account.



          Background language changing process approach:




          1. While fetching the language data in background How will you track
            the progress that which screens language data is available and what missing?

          2. What if at the middle of the language fetching process network connection breaks?

          3. While that background process was running (ongoing) what will user do
            in app?

          4. For example if user was at Activity C after moving from A and B and now the language fetching process is complete and you have to set the app locale. How will you set the locale of Activity A and B who are present in Activity Stack?


          I am not saying that the above discussed points are impossible to do. But for that background thing to work for us we have to devise a process to keep track of language data so that non of the required data is missing, also we have to implement retry mechanism in case of Network break and much more from a usability point of view.



          Foreground language changing process approach:



          Instead above discussed approach we can give support to the different Locales in our app by this way:
          https://developer.android.com/training/basics/supporting-devices/languages



          We can also go with another approach:



          At start of the app get the language preference from the user and then for that language data Call the Server/Backend to give you all the app language data in that api call and then Save this data to Local Database like SQLite for further use.
          But with this approach you will have to work a-lot on the backed side to have a proper panel to put that language data manually and save it so that your app can query and use it again (Note: still this approach has its own pros and cons).



          Alot of developer will still disagree with me on these points but thats how we can think and approach to this language thing. Maybe this can help someone !






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324512%2flanguage-update-on-background-while-asking-upfront%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Before answering your question lets take some factors into account.



            Background language changing process approach:




            1. While fetching the language data in background How will you track
              the progress that which screens language data is available and what missing?

            2. What if at the middle of the language fetching process network connection breaks?

            3. While that background process was running (ongoing) what will user do
              in app?

            4. For example if user was at Activity C after moving from A and B and now the language fetching process is complete and you have to set the app locale. How will you set the locale of Activity A and B who are present in Activity Stack?


            I am not saying that the above discussed points are impossible to do. But for that background thing to work for us we have to devise a process to keep track of language data so that non of the required data is missing, also we have to implement retry mechanism in case of Network break and much more from a usability point of view.



            Foreground language changing process approach:



            Instead above discussed approach we can give support to the different Locales in our app by this way:
            https://developer.android.com/training/basics/supporting-devices/languages



            We can also go with another approach:



            At start of the app get the language preference from the user and then for that language data Call the Server/Backend to give you all the app language data in that api call and then Save this data to Local Database like SQLite for further use.
            But with this approach you will have to work a-lot on the backed side to have a proper panel to put that language data manually and save it so that your app can query and use it again (Note: still this approach has its own pros and cons).



            Alot of developer will still disagree with me on these points but thats how we can think and approach to this language thing. Maybe this can help someone !






            share|improve this answer




























              0














              Before answering your question lets take some factors into account.



              Background language changing process approach:




              1. While fetching the language data in background How will you track
                the progress that which screens language data is available and what missing?

              2. What if at the middle of the language fetching process network connection breaks?

              3. While that background process was running (ongoing) what will user do
                in app?

              4. For example if user was at Activity C after moving from A and B and now the language fetching process is complete and you have to set the app locale. How will you set the locale of Activity A and B who are present in Activity Stack?


              I am not saying that the above discussed points are impossible to do. But for that background thing to work for us we have to devise a process to keep track of language data so that non of the required data is missing, also we have to implement retry mechanism in case of Network break and much more from a usability point of view.



              Foreground language changing process approach:



              Instead above discussed approach we can give support to the different Locales in our app by this way:
              https://developer.android.com/training/basics/supporting-devices/languages



              We can also go with another approach:



              At start of the app get the language preference from the user and then for that language data Call the Server/Backend to give you all the app language data in that api call and then Save this data to Local Database like SQLite for further use.
              But with this approach you will have to work a-lot on the backed side to have a proper panel to put that language data manually and save it so that your app can query and use it again (Note: still this approach has its own pros and cons).



              Alot of developer will still disagree with me on these points but thats how we can think and approach to this language thing. Maybe this can help someone !






              share|improve this answer


























                0












                0








                0







                Before answering your question lets take some factors into account.



                Background language changing process approach:




                1. While fetching the language data in background How will you track
                  the progress that which screens language data is available and what missing?

                2. What if at the middle of the language fetching process network connection breaks?

                3. While that background process was running (ongoing) what will user do
                  in app?

                4. For example if user was at Activity C after moving from A and B and now the language fetching process is complete and you have to set the app locale. How will you set the locale of Activity A and B who are present in Activity Stack?


                I am not saying that the above discussed points are impossible to do. But for that background thing to work for us we have to devise a process to keep track of language data so that non of the required data is missing, also we have to implement retry mechanism in case of Network break and much more from a usability point of view.



                Foreground language changing process approach:



                Instead above discussed approach we can give support to the different Locales in our app by this way:
                https://developer.android.com/training/basics/supporting-devices/languages



                We can also go with another approach:



                At start of the app get the language preference from the user and then for that language data Call the Server/Backend to give you all the app language data in that api call and then Save this data to Local Database like SQLite for further use.
                But with this approach you will have to work a-lot on the backed side to have a proper panel to put that language data manually and save it so that your app can query and use it again (Note: still this approach has its own pros and cons).



                Alot of developer will still disagree with me on these points but thats how we can think and approach to this language thing. Maybe this can help someone !






                share|improve this answer













                Before answering your question lets take some factors into account.



                Background language changing process approach:




                1. While fetching the language data in background How will you track
                  the progress that which screens language data is available and what missing?

                2. What if at the middle of the language fetching process network connection breaks?

                3. While that background process was running (ongoing) what will user do
                  in app?

                4. For example if user was at Activity C after moving from A and B and now the language fetching process is complete and you have to set the app locale. How will you set the locale of Activity A and B who are present in Activity Stack?


                I am not saying that the above discussed points are impossible to do. But for that background thing to work for us we have to devise a process to keep track of language data so that non of the required data is missing, also we have to implement retry mechanism in case of Network break and much more from a usability point of view.



                Foreground language changing process approach:



                Instead above discussed approach we can give support to the different Locales in our app by this way:
                https://developer.android.com/training/basics/supporting-devices/languages



                We can also go with another approach:



                At start of the app get the language preference from the user and then for that language data Call the Server/Backend to give you all the app language data in that api call and then Save this data to Local Database like SQLite for further use.
                But with this approach you will have to work a-lot on the backed side to have a proper panel to put that language data manually and save it so that your app can query and use it again (Note: still this approach has its own pros and cons).



                Alot of developer will still disagree with me on these points but thats how we can think and approach to this language thing. Maybe this can help someone !







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 15 '18 at 19:01









                Muhammad warisMuhammad waris

                16718




                16718
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324512%2flanguage-update-on-background-while-asking-upfront%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Bressuire

                    Vorschmack

                    Quarantine