Question: I'm trying to change default language of website from "en" to "jp".

The webpage both contain english and japanesse. 

I can't understand japanesse. But chrome translatation always suggest english translation (english to other language) first.

And I have to chage website language to japanesse to translation.

I think change website's default language can help. 

I figure chrome extension like Tampermonkey can override attribute of html.

Here's my code. 

```
// ==UserScript==
// @name default_lang
// @description change site language from en to jp
// @include         https://*siteaddress.com/*
// ==/UserScript==

document.body.innerHTML= document.body.innerHTML.replace(/xml:lang=\"en\" lang=\"en\"/g, "xml:lang=\"jp\" lang=\"jp\"");

```

Hope you could help me.

Answer: 
I am considering your string with delimiter /n 

```
var string="Segment Id : 82394 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (Permission)_01 | Segment Count : 0 /n  Segment Id : 82395 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (LeadYoung)_02 | Segment Count : 0"

var separatedAsArray=string.split('/n')
var string2=separatedAsArray.toString();

//Output of the above two lines
"Segment Id : 82394 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (Permission)_01 | Segment Count : 0 ,  Segment Id : 82395 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (LeadYoung)_02 | Segment Count : 0"

var formatedString = string2.split(',');

//Output of the above line is 
["Segment Id : 82394 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (Permission)_01 | Segment Count : 0 ", "  Segment Id : 82395 | Segment Name : SPA FIAT MAR 2020 LKADCLAKSC DEM (LeadYoung)_02 | Segment Count : 0"]

formatedString.forEach(function(element) {
var properties = element.split('|');
var obj = {};
properties.forEach(function(ele) {
    var keyValue = ele.split(':');
    obj[keyValue[0]] = keyValue[1];
});
 console.log(obj)
});

//Output of the above code snippet is
{
  Segment Count : " 0 ",
  Segment Name : " SPA FIAT MAR 2020 LKADCLAKSC DEM (Permission)_01 ",
  Segment Id : " 82394 "
}
{
  Segment Id : " 82395 ",
  Segment Count : " 0",
  Segment Name : " SPA FIAT MAR 2020 LKADCLAKSC DEM (LeadYoung)_02 "
}

```

After getting the individual object store them in the array or anywhere you want...
I recommed using `String.split()` method. The documentation is here [Javascript Split](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split).
To illustrate, what it does:

```js
const string = "Name | Value";
var results = string.split("|");
console.log(results); // Array: ["Name ", " Value"]
```

In your case, you can start splitting the string by "\n" (Newline) then "|" and finally ":".

Hope this helps you with your problem!