In Objective-C there is a method called NSLocalizedString() which is used to help with translating apps. It looks at a file of strings, provided by the app(put in by the programmer), based on where the user is from.
An example of how it could be used:
English.strings file:
"Hello" = "Hello"
Spanish.strings file:
"Hello" = "Hola"
world<<localizedString("Hello")
// Output would be "Hello" for English speakers and "Hola" for Spanish speakers