In our multi-platform projects, we have multiple localization files with different notation and file format (iOS .string, Android .xml, etc.).
Now we want to localize them in many languages, but in the different files, there are many equal strings. so anybody knows of a good way to consolidate these strings-files to one big localization file, hand this to the translation agency and then splut them back up into the different files?
Anybody knows a good approach?
I've worked on an iOS/Android project with 20 translations, and we used an Excel spreadsheet to keep track of all the translatable strings. The *.strings files for XCode and the *.xml files for Eclipse are then automagically generated using my custom VBA macro.
I've put an example Excel spreadsheet with VBA macro here:
http://members.home.nl/bas.de.reuver/files/multilanguage.zip
You can convert your existing .strings or .xml files to spreadsheet format (key value pairs, tab separated) with the tool below. Then you can send the spreadsheet to your translators, they fill in a column of translated values, send it back and you can simply generate your new translation files.
http://members.home.nl/bas.de.reuver/files/stringsconvert.html
EDIT in 2021
The homepage is offline now, but I've added the Excel/spreadsheet example on github:
https://github.com/BdR76/Manage-translations
Was in the same situation with my app about a month ago.
If you use SmoothLocalize for your localization (which I would recommend as they are really easy and super cheap), you don't have to pay for repeat strings on the 2nd order. So you would pay the full 4c/word for your iOS localization, then just paste in your order number for the Android localization and you don't have to pay to translate them again.
Also if they are EXACTLY the same, they will convert a .strings to a .xml for you so you would only have to do one order, just email them.
Related
So, i kind of created a monster. Built an android game for few years and used lots of hardcoded strings. Now i want to support different languages. My questions - is there an automatic way to create these resources?
for example tell Android studio for all the "hard coded" warnings apply extract string resource.
I aw aware of the inspect code that show you localization warnings, i am looking for a way to automate the fix
AFAIK, it's not possible to fix that automatically. You need to press Alt+Ctrl+Shift+i and type hardcoded strings. After completion of the finding process, manually create them in strings.xml.
I am attaching a link to site that will convert your string.xml to different language you want and then download translated string.xml in your stings folder, it will translate each string step by step, if this is what you want, hope it helps
https://asrt.gluege.boerde.de
I have the localised string file(s) of an internationalised Android app. Now I want to bring the string translations over to a new Windows Phone 8 ("WP8") app without having to manually copy every string individually.
I found several tools that can do iOS -> Android and/or Android -> iOS (e.g. LocalizedStrings2Android, stringsconvert, etc.), but there seems to be no tool out there that can transform the string files Android -> WP8 (or even iOS -> WP8).
Apple's iOS uses files with simple key-value pairs, Android has an XML file, and WP8 uses "XAML" that contains special binding clauses. WP8's format/content differs quite a bit from iOS's and Android's. Is that the reason no tool(s) exist?
I'd appreciate any pointers to existing tools or hints how to best approach this problem.
If you choose to downvote the question please be so kind to leave a comment.
And finally: No, web searches return nothing, unfortunately!
Microsoft Excel.
Open the Android’s strings.xml with it.
It will ask “How would you like to open?” choose “As an XML table”, it’ll message “Excel will create a schema”, press OK.
In Excel, use cut & paste to reorder the columns so the first column is "name" second is "string". You can cut and paste the compete columns by right-clicking on the headers.
Then you’ll be able to copy-paste the whole table, both names and strings, from Excel to the Visual Studio’s *.resx editor. You might have some issues if e.g. you have many names containing spaces, or with values containing newlines, but it still should be much faster then copy all your individual strings.
If you want to automate (e.g. if you have dozens of languages), the .resx format is a simple XML as well. If you know XSLT, the transformation will only take a few lines, if you don't, use any scripting language instead.
I have an Android project that I developed one year ago. I didn't think in do the project multi-language and now I need support it.
There are any easy way to detect all strings and generate the XML file? Or I need modify the project string for string?
The project is developed in Eclipse.
Android provides a very simple way to localize apps: string resources.
You need to provide several strings.xml files.
Each in a directory called /res/values-xy, where xy is the language (i.e.: es, fr, en, de, it, ...).
Then just refer these strings in your project, like R.string.my_string_name (in Java) or #string/my_string_name (in xml)
For reference: http://developer.android.com/training/basics/supporting-devices/languages.html
[EDIT]
Same goes for arrays: just use /res/values-xy/arrays.xml
Note: the names strings.xml and arrays.xml are just conventional ones can be changed to anything you like better.
AFAIK You need to modify the strings in your project manually. If you have hard-coded strings in your layouts then you can use Lint to find out all the hard-coded strings. Put them then into values/strings and the translation should go to the respective folder of each language.
EDIT:
If you're running Eclipse you can use the search feature to help you track all your hard-coded String. Check this topic
Many times I've seen Android apps that have a list of languages displayed and I can tap on any of this language and download it for this specific app (GO Weather widget has this functionality).
I'm interested in how is this implemented and what is the best way to load languages dynamically in Android apps? Adding 100 string.xml resources in app project is not a solution and besides if I want to provide some kind of "funny holiday language" pack or add a new language I would need to upload the project to Google Play again and again...
Thanks!
While it's possible to use Expansion Files to add on to your app, they are limited in some ways. The main problem for you would be that you can only have a limited number of expansion files. If you wanted 100 languages, your only option would be to load them all in the expansion file, and download the whole thing. While that might not be a problem, since a list of translated strings probably isn't that large, you may want to go a different route.
The best option I see for downloading separate language add-ons is to forgo using strings.xml altogether. Just use a simple CSV file to hold your strings, mapping names to strings. When your program starts, read it in to a string array/map/whatever, and you have all your strings at the ready. This way, if you want to add a language, it's as easy as downloading a text file and saving it to your data directory.
Also, you can keep a file listing all the available languages on the same server, so you don't have to update the app if you want to add seasonal or limited-time-only languages, like you mentioned. Just read in the file to get the list.
Note, you'll need somewhere to host the files, but that's hardly a barrier in this day and age.
I have some customers who have volunteered to translate my app's strings into their native languages. Of course they will not be using the Eclipse Android environment to do this, so what Windows-based tool/editor would be appropriate for them to use to work on the XML files that I send them?
I've been following your strategy as well for quite some time. Whenever a volunteer wanted to translate the app, he got the XML file containing all the strings, translated it and sent it back to me.
But people who are not very familiar with computers tend to fail at that task: I often received the XML files back as Microsoft Word documents (.doc) or they translated the XML keys (which become the strings' IDs later) as well.
Therefore I recommend you to use some convenient tool for collaborative translation such as Transifex, crowdin or Get Localization.
You can even use a small website I've set up mainly for myself that offers Android translation as well if you don't want to pay for those services. It's not beautiful, but it should do everything you need.
I use the Notepad++ editor for manipulate xmls, it is very easy to use this application.
If you are looking for an automatic translation tool. I had created one and is available here.
I also created an android string translator and prepared a short video to explain how it works. This video can be opened at the indicated link from screencast. The link links to the location of the Excel file that runs the translation code. The file is code signed, free and ready to go.
https://app.screencast.com/3175zvrfOg6dZ?conversation=DJjUGfR9NPJLPAxLv3Hg5F&tab=Details
`
In Android Studio I developed nine hundred key string pairs relevant to my application.
Android encapsulates each of these strings in a particular format.
Android provides for different languages by retaining a key value and a translated value as part of a unique string. A list of strings needs to exist in the app, for all required languages.
The Program translated 907 strings into twelve different languages. These languages are English, Arabic, Bengali, Chinese, French, Hindi, Indonesian, Japanese, Korean, Portuguese, Russian, Spanish. The total count of strings is close to 11000.
This would be a formidable task if done manually and so a computerized process makes it easier.
These languages are now all set up in my android application.
An android user can choose one of eleven languages to use the application. The translations are based on the visual basic routines created in Microsoft excel. The program backcheck the translated words back into English. The translations do not always carry the intending meaning when backchecked.
For example, when the program translates the English string, False, into Bengali, the program produces a Bengali string. When the program backchecks the Bengali string to English, the result is the English word, lie. There is a connection to the original meaning.
I concluded that the program would be useable in another language. The user would need to pay attention these variations in nuance.