I’m hoping someone can help a (broke) teacher with this.
I can write simple php stuff, but even after studying Hypermegaglobal’s Romanization conversion scripts, I’m just not able to get what’s going on or how to do this. (I think maybe he writes too elegantly.)
I need to write a script (preferably php because usually I can make some sense of it) that will take a file written in Chinese characters (simplified, actually ) and convert only SELECTED ones to Romanization. The idea is that I can keep a text file or database (SQL is fine) of the characters my students are supposed to have mastered, then convert all the ones that they aren’t supposed to know in a reading I write for them into Romanization to make a mixed reading I can print out or post on the Web for them. (Does that make sense?)
The fancy version would ask for a section name or number (I could see keeping a database with separate data on which characters each class “knows”, and producing customized readings based on each level or even section) but at present I’d just be happy with a script that would do the replacement using input from some source or other. The super-fancy version would somehow mark characters that were indicated in the file to be poyin characters (having more than one possible pronunciation) to make it easier to check them by hand.
I’ve found information on how to get a file into an array, but despite the careful comments in Hypermegaglobal’s scripts I can’t quite figure them out…??
:loco: Thanks for any help anyone has time to offer.