diff --git a/awx/ui_next/src/App.jsx b/awx/ui_next/src/App.jsx index ffafd07dba..5833714d89 100644 --- a/awx/ui_next/src/App.jsx +++ b/awx/ui_next/src/App.jsx @@ -30,7 +30,12 @@ const ProtectedRoute = ({ children, ...rest }) => function App() { const catalogs = { en, ja }; - const language = getLanguageWithoutRegionCode(navigator); + let language = getLanguageWithoutRegionCode(navigator); + if (!Object.keys(catalogs).includes(language)) { + // If there isn't a string catalog available for the browser's + // preferred language, default to one that has strings. + language = 'en'; + } const match = useRouteMatch(); const { hash, search, pathname } = useLocation();