We're travelling to Hungary and Italy and sant to understand what the most economical use of my cell phone is? Can I shut data off and only use it in a WiFi environment to text? Does that cost me anything?
To keep yourself from all kinds of unwanted charges, put your phone in flight mode and then turn the wifi on. This way if there is something that may cost you network use, it won't work. Only wifi will work.
If there is someone in particular you want to be able to "text" while you're on wifi only, consider installing BBM or Whatsapp, you could even use Facebook chat. Ask the other party to install the same application.
If you use an iPhone, most messages sent to other iPhones (strictly the ones with blue bubbles, not the green ones) can be sent on Wifi. But messages to anyone else (the green bubbles) will not work and it would probably be easier to use one of the apps suggested above.