In English, it’s easy. One letter substituted for anther letter. Sometimes, it will be a number, or a pattern. But in the end, you build up a word one letter at a time.
In Chinese though, for example, there are no letters, unless you count the Bopomofo thing (and I dont know if there is an equivalent list in Korean or Japanese or another language that uses little pictograms). Each word is a word, and there is no easy way to identify a word by describing it unless one is describing the exact strokes used to write the word, which would probably mean a dozen steps for each word. Hell, Chinese dictionaries are so complicated I actually read that they have competitions to find words in it!
So how do they do codes in Chinese and languages like that?
In modern times, it is not any different than alphabetic languages. Modern ciphers are basically designed to work on any arbitrary string of numbers. You feed it a string of ones and zeroes, and the algorithm scrambles that into a different string of ones and zeroes, and it is only possible to turn the output back into the original form if you have some kind of secret (the key) in your possesion. Computers can represent any text (in any languages), pictures, videos, etc, in numbers, so this doesn’t really matter.
Japanese has multiple writing systems, one of which is an alphabet (actually, syllabary, for nitpickers) of 40-some characters, so ciphers would work basically the same way they do in English.
And this is probably nitpicking, but codes and ciphers are not the same thing. A code works on a word or idea level, rather than on a character level. A coded message might say something like “The mother hen has laid an egg”, which might mean “The enemy has reinforced their military bases”, or it might mean “Food supplies are plentiful”, or maybe “The show we’re financing on Broadway isn’t very profitable”, or myriad other possibilities, depending on what the code is and what it’s being used for. The advantage of a code is that it’s much harder to crack, but the disadvantage is that you can only say the specific messages that were built into the code. And a code could be used in any language at all, regardless of what writing system, if any, they use.
The Japanese diplomatic code, called Purple by the U.S. cryptographers, was encoded in Latin letters (transliterated Japanese), using a machine based on telephone stepping switches, instead of the rotors that Enigma used.
JN-25, the naval code broken in time for the battle of Midway, was a code-book based cypher.