PHP import/export language packages? [Solved]
Posted: Wed Oct 17, 2007 9:32 am
Hello,
I need a little help with exporting data from a database that contains language packages.
To explain in short I have a small PHP script that is multilingual and all the phrases are stored in the database. It currently can export the phrases for a specific language package and it can also import the exported data. So it allows the usage of other language packages in the future.
It works great with the default language package I have setup, which is English; however I am having problems with other languages such as Polish, Greek, Russian etc... When I export the data and then try to import the data using my script all the special characters turn into question marks.
Since the exported data is in a flat PHP file I use PHP fwrite to write to the file. I tried to use PHP's utf8_encode, however that did not do much help. I also tested to change the collation of the database, which also did not help.
So I am rather lost as to how scripts like vBulletin can export language packages and then import it, while dealing with character issues.
Any help would be appreciated.
Thanks
I need a little help with exporting data from a database that contains language packages.
To explain in short I have a small PHP script that is multilingual and all the phrases are stored in the database. It currently can export the phrases for a specific language package and it can also import the exported data. So it allows the usage of other language packages in the future.
It works great with the default language package I have setup, which is English; however I am having problems with other languages such as Polish, Greek, Russian etc... When I export the data and then try to import the data using my script all the special characters turn into question marks.
Since the exported data is in a flat PHP file I use PHP fwrite to write to the file. I tried to use PHP's utf8_encode, however that did not do much help. I also tested to change the collation of the database, which also did not help.
So I am rather lost as to how scripts like vBulletin can export language packages and then import it, while dealing with character issues.
Any help would be appreciated.
Thanks