Actually, I had this thought early today over on the D20 Radio message board as a poster there asked the same question.
My solution was for those languages that the GM honestly feels the players would not already have a way of knowing, have them make an Intellect check, with the difficulty based upon how rare or generally hard to understand the language is. Increase the difficulty by one for obscure or highly technical information, and reduce it by one (minimum Easy) if the speaker is trying to convey very simple information.
So for Shyriiwook (Wookiee-speak), it'd be an Average difficulty under most circumstances, Hard if he's trying to explain why your speeder's engine failed, and Easy if he's asking where the little sentient's room is. Conversely, trying to decipher the Sith language would be at least Daunting.
Actually, now that I think about it, this could be an excellent use for the Knowledge (Education) skill; a person with a broad, more in-depth education would probably have had more exposure to different languages, and thus a better chance of understanding other languages.
And if you really do want to go the route of "you only speak X number of languages," then I'd suggest X be equal to the character's Intellect (as everyone seems to be able to converse in at least a couple of languages) plus their native tongue, with each rank in Knowledge (Education) providing an extra known language. So a hot-shot bush pilot fresh off the moisture farm with an Intellect of 2 would speak Basic and two other languages (one of them likely to be a trade language), while a seasoned scholar with Intellect 3 and Knowledge (Education) 2 would be fluent in five languages in addition to their native tongue.