Skip to content

Commit

Permalink
update the lang of the html element according to language displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
ocsiddisco committed May 13, 2024
1 parent 6554d6f commit e4c712e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const resources = {

// manage list page
MessageAddItems: 'Add new items and share your list with other users',
AddItem: 'ADD A NEW ITEM',
AddItemTitle: 'ADD A NEW ITEM',
InputTypeNewItem: 'Type a new item name',
ChooseDate: 'Choose item s likely need date',
Soon: 'Soon (within 7 days)',
Expand Down Expand Up @@ -140,7 +140,7 @@ const resources = {

// manage list page
MessageAddItems: 'Ajoutez un nouvel element, ou partagez votre liste',
AddItem: 'AJOUTER NOUVEL ELEMENT',
AddItemTitle: 'AJOUTER NOUVEL ELEMENT',
InputTypeNewItem: 'Ecrivez le nom d un element',
ChooseDate: 'Quand en avez-vous besoin ?',
Soon: 'Sous peu (sous 7 jours)',
Expand Down Expand Up @@ -198,4 +198,6 @@ i18n
},
});

document.documentElement.lang = i18n.language;

export default i18n;
2 changes: 1 addition & 1 deletion src/views/ManageList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export function ManageList({ data, listPath, userId, userEmail }) {
className="flex flex-col text-base sm:text-lg"
>
<h2 className="text-lg sm:text-xl text-left text-darkPurple border-solid border-darkPurple border-b pb-2 mb-8">
{t('AddItem')}
{t('AddItemTitle')}
</h2>

<input
Expand Down

0 comments on commit e4c712e

Please sign in to comment.