Save the Value/State of a radio button in Preferences

Is there a way to save the state or value of a radio button in preferences? I have radio buttons controlling theme and language and I want to be able to save the state even when the user leaves the app. I know how to save text in preferences but I cant figure this out for some reason. Thanks!!