Hey everyone.

In a nutshell this is what I want to do.

I want to:
- Allow developers to write code in C++ using non-latin based languages. i.e > use #define (or whatever) to specify a non-latin based character as a keyword/variable.

e.g >

Instead of (English):

if(x < 1){
"Hello"
}

I want to be able to (Korean, won't display if you don't have support for asian languages) :

만약(ㅂ < 1){
"안녕"
}

Now I tried using #define but obviously the compiler (gcc) didn't like the non-latin characters.

Anyone got any idea how to enable support in GCC or where is the actual problem ?

>Anyone got any idea how to enable support in GCC or where is the actual problem ?
What you want (to a point) is some kind of extended character set for your compiler. Unicode is widely supported by compilers these days, so for example you can already change "Hello" to "안녕" and x to ㅂ if your compiler supports Unicode.

What you can't do is replace if with 만약 because that changes the code points, and thus, the meaning of the keyword. Regardless of the native language you want to program in, the English keywords of C++ will remain English unless you write some kind of preprocessor to convert your native language translations of the keywords to valid C++.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.