Translate phrases and words in a code automatically - translation

Is there a way to translate phrases and words in a script (pawn code) automatically without messing up the script, the script contains a lot of Russian it's hard to go through each word/phrase to translate it.

Assuming you are working in SA-MP, there is a plugin allowing to interface with the DeepL API, allowing for translation of messages at runtime. You can hook SendClientMessage and similar functions to first translate the message, if needed.

Related

How to print a paper in Lua

I want to make a program in lua where I put the user puts several inputs and then press on a button and all these inputs are then printed in a certain format in a paper, How do I physically print a paper in lua ?
Accessing a physical printer and sending it a file to print is fairly complicated and is beyond the scope of what I've done with Lua so far, but I would suggest checking out this forum post.
Your best option might be to save the stuff you want to print to a text file (such as a PDF using a Lua to PDF library, there are several available with a Google Search, such as this one by cpressey or this one by jung-kurt) and then using C++ or some other language to send that file to a physical printer and print it. Microsoft has a pretty decent guide on how to do that.
Hopefully you find this helpful, have a great weekend!

Android localization/translation

I have a keyboard app designed for Serbian language. My keys have labels based in Serbian cyrillic alphabet. My xml strings that are used for those labels are enclosed in <xliff:g></xliff:g> tags, but a certain provider on a certain type of a phone still translates these into a different language. Just in case, I also have my strings in language specific folders, but it still happens. Does anyone know if there is a way I could disable translating of all my strings any other way?
There are providers who can handle technical files translations,i.e. know what to translate in technical files. Also, some are available for you to manage the translations. OneSky is one of these platform and we also provide translation service.
See GIF of how placeholder validation works in OneSky
Disclaimer: I work in OneSky

gettext po file editor to show multiple po files

In our company we are trying to decide whether to use english for our message id or whether we should invent some kind of key. We can only take the second approach if there are editors which allow us to work on multiple po files in one interface because translators will need to use english in order to translate into another language rather than translating from some cryptic message id.
Is there a tool which basically circumvents the messageid and allows translation from one language into another?
I guess many translation tools do support this mode as it is used by several translation formats (like Android resource strings or Java properties). However it is not commonly used with Gettext (as you might easily end up with application showing message ID instead of not translated text).
I believe it should work with Weblate, though most likely nobody has ever used this mode with Gettext files.
Update: This mode is fully supported in Weblate and used by many projects now.

Need some input on how to build a large scale text replacement system

My Rails app deals a lot with data from third-party APIs (specifically UPS, FedEx, DHL, etc).
What I'd like to do is whenever that data comes in, replace certain phrases with customized phrases.
Example: "On FedEx vehicle for delivery" (which we get from the FedEx API), I'd like to replace with "Out for Delivery."
Is it best to replace the the text on its way in to the database? Or on output? (Talking from an end-user speed perspective)
I'm planning on storing these phrases in our database, so I'm assuming I'd just create a helper that pulls the phrases I want to replace and then run the strings through those using gsub and replace as necessary?
Any tips on making this efficient and easy to manage would be great.
For speed you should replace the phrases when they enter the database. If you do it on output you'll have to do it every time an user requests the data. It is quite obvious that doing it every time will put more load on the server.
You may, however, want to store the original phrases, in case you want to change the wording in the phrases you replace with.
Just a random idea, which might not be applicable depending on how your data is, but maybe you could leverage the i18n framework that's built into Rails for this. The original text could be viewed as a separate language called vendorspeak :-).

free to use, in a programmer-friendly format, dictionaries for european languages

I want to experiment with an idea I have of automatically localizing software, or at least suggesting a reasonable translation if a localized string is not available.
I'm not sure this will be working satisfactorily tomorrow morning but I just wanted to play with this idea.
Does anybody know of a dictionary that is free to use, and is in an easy to parse format, that can help me automatically translate words from English to other European languages (French, German, Spanish, etc)
The FreeDict project has quite a few relatively complete dictionaries. Most are from one language to english or vice versa, but some are between two non-english languages as well.
I don't know any dictionary but would like to point something out. You have to bear in mind that translating is not a direct word to word technique in any sense. The Rules of the language change as well and thus leave sentences unreadable. This is why even companies like Google have trouble making good translation software. Context is very hard to programmatically detect and context means everything in choosing the right word, the right structure and so on.
Maybe use a Translation API, if there is one. Google only seem to do a JavaScript API for Language.
You can't even expect to get a reasonable translation with an automatic method. Translating full texts is too hard for a computer to handle completely correct, translating short phrases correctly is impossible.
Take for example the simple text "Open", without a context it's not even possible to tell if it's a verb or an adjective. I know that at least in german that the verb and the adjective translates into two different words.
Also, computer specific concepts often borrow words from similar concepts outside the computer sphere. Those concepts often have a specific translation, but an automatic translation would sometimes try to translate it as if it was the original meaning, which can give you very strange translations.
After a while of searching i solved the problem by myself start to create my own dictionary. I do a lot of translations in my free time. In the beginning it is really boring work...but after a while you get an really good dicitionary. Some friends of mine using it too...so we all benefit from every new Word we translate.

Resources