r/AskProgramming • u/Melodylokstar • Aug 26 '26
Is it hard to program language Translators into things?
Hi, as a non programmer with basically zero knowledge on programming or coding.
Im wondering how hard is like programming a language translation tool into different things?
I ask because i play a shitty phone game called Kingshot, and it has an inchat Translator where next to every message some one sends, there is a little button that will translate what ever message into the language you have the game set to.
And like? While it’s not perfect, it’s REALLY good, and makes the game way more fun to be playing with people from different countries and not having to go back and forth with google translate to have a conversation.
And I’m now wondering why more apps and games don’t have translators built in?
Is it hard?
Are translators like difficult to configure and implement?
Whats the go?
(Feel free to explain anything super technical like I’m 5)
10
u/KingofGamesYami Aug 26 '26 edited Aug 26 '26
Historically it has been difficult or expensive. Recently it has been made much easier on some platforms.
For example on Android there is now a Translation framework launched in October 2021 with Android 12, while on iOS there is a Translation framework available starting September 2024 with iOS 18. MacOS has a similar framework, while Windows has nothing (yet).
On the Website side, Chrome, Edge, and Opera implement the Translator API, but Safari and Firefox do not.
If you're only targeting very new mobile devices this is fine, but even today there is a large chunk of iOS devices (15%) not updated.
13
u/Vymir_IT Aug 26 '26 edited Aug 26 '26
You don't program that at all, you just integrate a third-party translation API and pay for it. Or spin-up an open-source pre-trained LLM model on your server and pay for the cost of running it. Anycase, it's like 1 day of setup, the bottleneck is paying for that shit.
3
u/soundman32 Aug 26 '26
Its VERY hard. Its not like there is an alternate word for every other word, or a phrase in every other language. Even some closely related languages are difficult to translate with code. Some languages have gender for nouns (e.g. french le vagina or la piscine), and others have 3 or more genders (neuter in german). Sometimes those genders differ depending on context. Even just numbers is hard unless you brute force it.
1
u/aocregacc Aug 26 '26
I think we'll see that more often as on-device translation becomes easier to integrate and more available on phones.
firefox for example does all of its translation on-device, even on mobile. It'll become part of the functionality provided by the OS, if it's not already.
1
u/ayassin02 Aug 27 '26
It’s pretty easy. You just integrate a translation api and viola. No one actually reinvents the wheel
1
u/high_throughput Aug 27 '26
This is the kind of thing where grassroots efforts can really help. If you play a phone game and regularly see foreign messages in the chat, consider submitting a feature suggestion to the developers.
It's not hard to add for a phone game these days, but it doesn't happen by itself.
1
u/[deleted] Aug 27 '26
[removed] — view removed comment