Closed vallieresc closed 1 year ago
The languages in the header selector of the admin app are defined in the apptext_admin app. Initializing the app with languages affects your own app, not the admin app. If you want to change the languages for the admin app, you can do that by selecting the admin app first (top-left) and then edit the app to add/remove languages for the admin app.
Got it! I believe the default should probably be English only as most will use this language and it is for the admin app only. After removing NL, I saw that there was a bug with the dropdown menu in the client app. It is still showing even though there is only 1 language. I can send you a pull request for that.
A PR would be great, thanks :-). I'm not sure if only English as default language is a good idea, because the admin app itself is such a nice example of how you can use AppText.
I got something started, I'll try and complete it and test it. For us, our admin is English only and the public app is multilingual. I would think that most would have this setup. As an example WordPress admin is in your selected language, only the public UI is multilingual.
@martijnboland The admin views seem to be missing from the AppText.AdminApp project. The views folder has an X on it. Am I missing something? Here's the exception: InvalidOperationException: The view 'AppTextAdmin' was not found. The following locations were searched: /Views/Admin/AppTextAdmin.en.cshtml /Views/Admin/AppTextAdmin.cshtml /Views/Shared/AppTextAdmin.en.cshtml /Views/Shared/AppTextAdmin.cshtml /Pages/Shared/AppTextAdmin.en.cshtml /Pages/Shared/AppTextAdmin.cshtml
Ah yes, that's a bit tricky: the AppTextAdmin view is created by the client-side build. This build takes the AppTextAdminTemplate view from the ClientApp/Templates folder and inject the proper script references and the copies the completed view to the final destination. So the solution is to run 'npm install' followed by 'npm run build' in the ClientApp folder of the Apptext.AdminApp project. More info can be found here.
I always see EN and NL languages in the header language selector even after initializing the app with EN and FR languages