Skip to content

Commit

Permalink
Set "lang" of the root element dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Oct 16, 2024
1 parent 2309d40 commit c22816e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/web/count-down.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="ja">
<html>
<head>
<title>Confirmation</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
Expand Down
2 changes: 2 additions & 0 deletions src/web/count-down.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Office.onReady(() => {
l10n = L10n.get(language);
l10n.ready.then(() => l10n.translateAll());

document.documentElement.setAttribute("lang", language);

Office.context.ui.addHandlerAsync(Office.EventType.DialogParentMessageReceived, onMessageFromParent);
sendStatusToParent("ready");
});
Expand Down
2 changes: 1 addition & 1 deletion src/web/dialog.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="ja">
<html>
<head>
<title>Confirmation</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
Expand Down
2 changes: 2 additions & 0 deletions src/web/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Office.onReady(() => {
safeBccConfirmation = new SafeBccConfirmation(language);
attachmentsConfirmation = new AttachmentsConfirmation(language);

document.documentElement.setAttribute("lang", language);

Office.context.ui.addHandlerAsync(Office.EventType.DialogParentMessageReceived, onMessageFromParent);
sendStatusToParent("ready");
});
Expand Down

0 comments on commit c22816e

Please sign in to comment.