How can I randomize the card direction in an Anki deck while studying—so sometimes the front shows Brazilian Portuguese and other times it shows Spanish?
At the moment, the front side is in Brazilian Portuguese and the back in Spanish. I’m using the standard card type in Anki for Android.
Is there a way to make it switch randomly between both languages during review without messing the card layout?
That said, you should consider using two separate card types for this sort of thing instead. Recalling information in two different directions typically varies in difficulty, and successfully performing one does not necessarily mean being good at the other. Having individual cards for each direction allows them to have independent review histories, which will work better with the algorithm selecting review intervals for each.
I’m just going to repeat that last think Eltaurus said in bold –
You should consider using two separate card types for this sort of thing instead. Recalling information in two different directions typically varies in difficulty, and successfully performing one does not necessarily mean being good at the other. Having individual cards for each direction allows them to have independent review histories, which will work better with the algorithm selecting review intervals for each.
Just because you can do something, doesn’t mean it’s a good idea. Learn about note types and card types instead, and have Anki make a 2nd card from each of your notes. Getting Started - Anki Manual
It seems to me that you are just begging for the Basic Optional Reverse Card Note Type (one of the basic ones provided with an empty Anki).
Most of my vocabulary decks — be they basically word lists, or example sentences — use reversible cards. Set Anki up according to the recommended defaults and Anki will pick from either direction randomly. Have a look at one of my simple decks: Esperanto 1000 Most Frequently Occurring Words. It uses the Optional Reversed note type, which I have modified slightly to show background colours to help me distinguish, in which language a text is showing (e.g. in the case, where the word is spelt the same in both languages).
The Optional Reverse note type is great, because where there is not a one-to-one relationship, you can still learn a word, but just not use the reverse direction, because it would not be clear.