turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 155 forks source link

Issue with JS (vuejs) #382

Closed sShrek1 closed 5 years ago

sShrek1 commented 5 years ago

I got an webform application with VUEJS frontend.

Inside my "select" i have and option which is looping through an array.

<select id="partId" v-model="selectedPart">
<option v-bind:value="product.Id" v-for="product of viewModel.products">{{[#[product.Name]#]}}</option> </select>

It is recognizing the nuggets [#[ ]#] but the code doesnt seem to translate.

In a static txt file I've added all products, [#[ water ]#]. Ive edited this with an po-editor but it still doesnt work.

I have this in my web.config:

<httpCompression>
<dynamicTypes>
<clear />
<add enabled="true" mimeType="text/*"/>
<add enabled="true" mimeType="message/*"/>
<add enabled="true" mimeType="application/javascript"/>
<add enabled="true" mimeType="application/x-javascript"/>
<add enabled="true" mimeType="application/atom+xml"/>
<add enabled="true" mimeType="application/xaml+xml"/>
<add enabled="true" mimeType="application/json"/>
<add enabled="false" mimeType="*/*"/>
</dynamicTypes>
</httpCompression>

Any ideas?

sShrek1 commented 5 years ago

Solved. You can close this.

The problem was we are sending json data from backend - solved it by adding tags around "product name" before serializing the data in the backend, then send it to frontend.

turquoiseowl commented 5 years ago

Great, thanks for the update.