Skip to content

Commit 8f82aa9

Browse files
authored
Merge pull request #1690 from magic-peach/feature/issue-1687-i18n
feat: Add multi-language support (Issue #1687)
2 parents 0d226f7 + 8ddc7bb commit 8f82aa9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

frontend/i18n/translations.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
translations = {
2+
'en': {
3+
'welcome': 'Welcome to AgriTech',
4+
'dashboard': 'Dashboard',
5+
},
6+
'hi': {
7+
'welcome': 'AgriTech me svagat hai',
8+
'dashboard': 'Dashboard',
9+
}
10+
}
11+
12+
def get_translation(lang, key):
13+
return translations.get(lang, {}).get(key, translations['en'].get(key, key))
14+

0 commit comments

Comments
 (0)