Comments (15)
This happend to me when I created a file in Visual Studio. The translations on page had � inside.
I opened the same file with Visual Studio Code, I saw the � chars there also. I replaced the texts and saved a file which solved my issue. It seems that the Visual Studio is messing with encoding.
Top: VisualStudio Community Bottom: VisualStudio Code
from i18next.
as i use a lot of german special chars (ä, ö + ü,...) not sure where the problem is.
- try
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
in the header of the html - assert resource file comes with utf-8 encoded
from i18next.
@jamuhl 3,967 days later, but I love you
from i18next.
I started to develop using i18next few weeks ago. For now I just have fr/en translations and I've got no problems with accents.
As jamuhl said, try to change your header meta tag. I use pretty much the same he gave you : <meta charset="UTF-8">
from i18next.
Thank you for your responses, I've tried what jamuhl said, but I did'nt managed to do it.
Here is my page :
http://m0si.com/lang/index.html?setLng=fr-FR
I can send you the sources if you need to see but I still have problem with accents
from i18next.
What do you use on serverside to serve the json files? For me it seems like there's the problem as their content already has the unknown char �.
from i18next.
Here is the content of the json file (ns.special.json) :
{
"app": {
"title": "Le titré",
"content": "Voici chère frère mon contenu...",
"footer": "Pied de page"
}
}
from i18next.
in the "locales/fr-FR" folder
from i18next.
i meant...your server is serving the json files in wrong encoding. Might be configuration issue in apache or whatever you use as webserver.
from i18next.
how can I change it, and where? please
from i18next.
if your using apache this might help you:
http://stackoverflow.com/questions/913869/how-to-change-the-default-encoding-to-utf-8-for-server
from i18next.
closing this...you might try to find answer at stackoverflow
from i18next.
In regards to this, if you are using a text editor make sure you set the encoding also to UTF-8. This was my problem 🌎
from i18next.
@toxinhead good catch...i always forget there are editors that save in non utf-8 formats by default. how fast one forgets. thanks a lot for pointing to this solution.
from i18next.
I had the same problem, with the same solution. . I copied and pasted the text from translation.json into another file and resaved it, and it was fine. Originally I edited the file in eclipse, but i switched to notepad++
from i18next.
Related Issues (20)
- Support pluralization rules for constructed languages (conlangs) HOT 2
- Correct usage of returnObjects with TypeScript is not documented HOT 4
- t.v4.d.ts:189:47 - error TS1005: '?' expected HOT 4
- skipOnVariable not working for non key input in `t` HOT 3
- 23.7.13 -> 23.7.14 Regression with 'Type instantiation is excessively deep and possibly infinite' HOT 3
- Translations are not working when network connection is down HOT 4
- ASCII Decoding HOT 1
- Correct way to use i18n.t() inside index.ts files in React + TypeScript application HOT 2
- RangeError: Maximum call stack size exceeded at deepExtend HOT 2
- i18next::backendConnector: TypeError: Failed to parse URL HOT 1
- Get the wrong API call HOT 3
- React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render. HOT 3
- getFixedExists should support function getFixedT HOT 1
- Error: You are passing a wrong module! Please check the object you are passing to i18next.use() HOT 1
- The ‘const’ keyword is extraneous in the ParseKeys type definition. HOT 2
- Not existing context not detected as type error if covered by string union HOT 8
- Allow default value in nested translation HOT 3
- Autocompletion doesn't work on large files in webstorm HOT 1
- Don't get the correct types if the key contains _ HOT 2
- Unsupported language is automatically added to preload option HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18next.