I have an existing site that has been dual language. Now I started sending the ad text to a third party for translation in real time.
I have however decided that I should cache the results .
After looking at and modifying the code it seems easy to incorporate these cached results into the existing code. The code already has a translation array which I have added an additional array to . I can manually enter text into thsi array and have my custom translation appear rather the the live online translation . It is however my goal to write the live on-line translations into this array.
All I need to be able to do is to dynamically create the array. The format is:
[php]
[/php]
Now i need to be able to figure out how to go about adding lines to this array and deleting old ones.
I figure it might be easiest to make this array a fixed number of entries say 1000 and I start with 1000 blank entries which can be filled in as needed . Then when all 1000 are full we would start deleting from the top (or bottom if that were the case) , the older entries, creating new lines at the bottom for new entries.
Maybe there is an easier way?
I have no clue how to do this but have the rest 99% ready to go
Help appreciated.