"Tá tú i do chónaí i gCeanada ach tá mé i mo chónaí sa Bhrasaíl."
Translation:You are living in Canada but I am living in Brazil.
i = "in", in = "in" (when the next word starts with vowel), sa = "in the", san = "in the" (when the next word starts with vowel)
In English most country names do not have the definite article with a few exceptions like the Netherlands. In Irish it is the other way around most have the definite article, with a few exceptions like Sasana.
Does which preposition gets used with countries have anything to do with gender, as it does in French (en France (f) vs. au Canada (m))?
No; the choice of i vs. sa vs. san vs. sna depends on whether the country doesn’t take an article; takes an article, is singular, and begins with a consonantal sound; takes an article, is singular, and begins with a vowel sound; or takes an article and is plural, respectively. It is common for feminine countries of the second declension to take an article, though.
Since this is my first encounter with Ceanada agus Brasaíl, what specifically causes us to use "i Ceanada" and "sa Bhrasaíl" in these examples? Is Canada a country that does not take the definite article in Gaeilge, but Brazil does?