ananás pineapple in European Portuguese and Ananas in German and ananas in Arabic.
It's from old tupi. So all those languages simply borrow it for this"new"type of crop. For Swahili, the i sound in the end is common for borrowed words.
In Mexico, the widely preferred word is piña. I would assume that most people wouldn't understand the word ananás, but, as it is a literary word, some people know it.
Wow, in Gujarati it's અનાનસ, (ananas), too! HOW DID WE COME UP WITH PINEAPPLE?
According to the Oxford Dictionary:
Origin: late Middle English (denoting a pine cone): from pine + apple. The word was applied to the fruit in the mid 17th century, because of its resemblance to a pine cone.