When I use Node::load(10)->toArray()
I see that my module thinks that the current language is English. I have the language key (fr) in the url and when I place \Drupal::languageManager()->getCurrentLanguage()->getId()
in my code it says (fr). How can I get Node::load(10) to see the current language the user is using?
When I translate the content type into another language, all translations of the same page seem to have the same id to place into the load function.