258258
259259import { KalaamKeywords } from " kalaam" ;
260260
261+ const langs = Object .keys (KalaamKeywords);
262+ console .log (" SDFsfsdfsf" , langs);
263+
261264// CodeMirror is an npm package whcih provides rich code editors
262265import { codemirror } from " vue-codemirror" ;
263266
@@ -294,7 +297,7 @@ import "codemirror/addon/fold/xml-fold.js";
294297// import Compile from "../lib/Compiler/main";
295298
296299import { Compile } from " kalaam" ;
297-
300+ console . log ( " ankitedfg " , Compile);
298301// //Central data storage of Kalaam
299302// import { mapState } from "vuex";
300303
@@ -370,7 +373,8 @@ export default {
370373
371374 model: null ,
372375
373- options: [" Hindi" , " Marathi" , " Bengali" ],
376+ // options: ["Hindi", "Marathi","Bengali","Telugu"],
377+ options: langs,
374378 };
375379 },
376380
@@ -384,23 +388,31 @@ export default {
384388 computed: {},
385389 watch: {
386390 ActiveLanguage : function (newval , oldval ) {
387- if (this .ActiveLanguage == " Hindi " ) {
391+ if (this .ActiveLanguage && langs . includes ( this . ActiveLanguage ) ) {
388392 localStorage .setItem (" ActiveLangugae" , this .ActiveLanguage );
393+ this .Keyword = KalaamKeywords[this .ActiveLanguage ];
394+ } else {
395+ localStorage .setItem (" ActiveLangugae" , " Hindi" );
396+ this .Keyword = KalaamKeywords[" Hindi" ];
397+ }
398+ // if (this.ActiveLanguage == "Hindi") {
399+ // localStorage.setItem("ActiveLangugae", this.ActiveLanguage);
389400
390- this .Keyword = KalaamKeywords .Hindi ;
391- } else if (this .ActiveLanguage == " Marathi" ) {
392- localStorage .setItem (" ActiveLangugae" , this .ActiveLanguage );
401+ // this.Keyword = KalaamKeywords.Hindi;
402+ // } else if (this.ActiveLanguage == "Marathi") {
403+ // localStorage.setItem("ActiveLangugae", this.ActiveLanguage);
393404
394- this .Keyword = KalaamKeywords .Marathi ;
395- } else if (this .ActiveLanguage == " Bengali" ) {
396- localStorage .setItem (" ActiveLangugae" , this .ActiveLanguage );
405+ // this.Keyword = KalaamKeywords.Marathi;
406+ // }
407+ // else if (this.ActiveLanguage == "Bengali") {
408+ // localStorage.setItem("ActiveLangugae", this.ActiveLanguage);
397409
398- this .Keyword = KalaamKeywords .Bengali ;
399- } else if (this .ActiveLanguage == " Telugu" ) {
400- localStorage .setItem (" ActiveLangugae" , this .ActiveLanguage );
410+ // this.Keyword = KalaamKeywords.Bengali;
411+ // } else if (this.ActiveLanguage == "Telugu") {
412+ // localStorage.setItem("ActiveLangugae", this.ActiveLanguage);
401413
402- this .Keyword = KalaamKeywords .Telugu ;
403- }
414+ // this.Keyword = KalaamKeywords.Telugu;
415+ // }
404416 },
405417 },
406418
0 commit comments