-
-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enabling i18n feature for smaller screens (#3556)
* added langauge option in mobile navbar * updated locale names * added functionality to highlight current language * added language icon * fixed nav items spacing * updated add translations doc * updated add translations doc * Update components/icons/Language.tsx Co-authored-by: Ansh Goyal <[email protected]> * refactor: revert localname from full form to first-two-letters * refactor: removed need to change locale display name at multiple places * fix: lint issues * chore: removed usage of lib in the translation doc * updated doc * updated language name to full name in options * fixed linting issue * refactor: moved langmap to next-i18next.config.js * updated adding translation readme --------- Co-authored-by: Ansh Goyal <[email protected]> Co-authored-by: Akshat Nema <[email protected]> Co-authored-by: asyncapi-bot <[email protected]>
- Loading branch information
1 parent
3efb7d3
commit a3dc30d
Showing
7 changed files
with
142 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
|
||
/* eslint-disable max-len */ | ||
/** | ||
* @description Language Icon for language selector component | ||
*/ | ||
export default function IconLanguage({ className = '' }) { | ||
return ( | ||
<svg | ||
xmlns='http://www.w3.org/2000/svg' | ||
fill='none' | ||
viewBox='0 0 24 24' | ||
strokeWidth={1.5} | ||
stroke='currentColor' | ||
className={`size-5 ${className}`} | ||
> | ||
<path | ||
strokeLinecap='round' | ||
strokeLinejoin='round' | ||
d='m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802' | ||
/> | ||
</svg> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
module.exports = { | ||
i18n: { | ||
locales: ['en', 'de'], | ||
defaultLocale : 'en', | ||
namespaces: ['landing-page', 'common', 'tools'], | ||
defaultNamespace: 'landing-page', | ||
react: { useSuspense: false },// this line | ||
}, | ||
|
||
}; | ||
i18n: { | ||
locales: ['en', 'de'], | ||
defaultLocale: 'en', | ||
namespaces: ['landing-page', 'common', 'tools'], | ||
defaultNamespace: 'landing-page', | ||
react: { useSuspense: false },// this line | ||
}, | ||
langMap: { | ||
en: 'English', | ||
de: 'Deutsch', | ||
}, | ||
}; |