Reconnecting with his Jewish heritage was part of the creative process for Seth Rogen on his new comedy, “An American Pickle.” For one, the actor learned to speak Yiddish for the first time for the film.

“I had heard [Yiddish] my whole life, but I did not know it,” Rogen said Tuesday during the film’s virtual premiere, in a 30-minute Q&A following the screening. “I did have to learn it, basically phonetically, for the movie. It’s a really hard language to learn.”

Rogen plays two characters in the film: Herschel Greenbaum, an early 1900s Jewish immigrant from Eastern Europe who wakes up to a modern day New York City after being preserved for 100 years after falling into a barrel of pickles, and his great-grandson Ben, an app developer in Brooklyn.

“Yiddish was spoken in my household. My grandparents spoke Yiddish,” Rogen said. “They mostly swore in Yiddish and said terrible things to one another that they didn’t want me to understand. Yiddish was, largely, a language based on profanity and insulting other family members.”

He joked, “A lot of Jews can probably relate to that.”

“An American Pickle,” which premieres on HBO Max Aug. 6 as the streamer’s first original feature film, speaks to some of the identity issues and personal challenges Jewish immigrants faced upon arriving in the country a century ago and how life has changed for their descendants generations later.

Ben learns from his great-grandfather how to harness his untapped potential with strength and character.

“I couldn’t have related to it more,” Rogen said. “My grandfather was a tough man. He borderline tolerated me at best, as my grandfather. If we were the same age, he definitely would have beaten the living s— out of me, I could imagine.”

“An American Pickle” was written by former “Saturday Night Live” writer Simon Rich and based on his own short story that was first published in The New Yorker in 2013.

“It’s based on my own experience growing up as the descendant of some incredibly hard-working, disciplined Eastern European Jews, who immigrated to the U.S. with pennies in their pocket and had all sorts of insane hardships that they overcame,” said Rich, who has also written for Pixar and created the TBS show “Miracle Workers.” “My life, in comparison, has been incredibly easy. I always felt a huge amount of self-loathing and guilt because they sacrificed so much, and I so often take it for granted.”

HBO Max also marked the occasion by making a donation to ​NYC Health + Hospitals Covid-19​ and to ​HFC​ to aid its efforts to provide additional support during Covid-19 for family caregivers of those impacted by Alzheimer’s.