How to manage XLIFF Files for Localization? XLIFF stands for XML Localization Interchange File Format. An OASIS open standard for Localization content.
seen from United States
seen from Germany
seen from Saudi Arabia
seen from Saudi Arabia
seen from China
seen from Saudi Arabia
seen from China

seen from Germany
seen from Germany

seen from United States
seen from United States
seen from Singapore
seen from Saudi Arabia

seen from United States
seen from Saudi Arabia

seen from United States
seen from Saudi Arabia
seen from Saudi Arabia
seen from China
seen from United States
How to manage XLIFF Files for Localization? XLIFF stands for XML Localization Interchange File Format. An OASIS open standard for Localization content.
XLIFF 2.x... the translator's panacea?
XLIFF 2.x… the translator’s panacea?
In the last year or so many articles have been written about XLIFF 2.0 explaining what’s so great about it, so I’m not going to write another one of those. I’m in awe of the knowledge and effort the technical standard committees display in delivering the comprehensive documentation they do, working hard to deliver a solution to meet the needs of as many groups as possible. The very existence of…
View On WordPress
Handling PDFs... is there a best way?
Handling PDFs… is there a best way?
We all know, I think, that translating a PDF should be the last resort. PDF stands for Portable Document Formatand the reason they have this name is because they were intended for sharing with users on any platform irrespective of whether they owned the software used to create the original file or not. Used to share so they could be read. They were not intended to be editable, in fact the…
View On WordPress
Alternatives to genstrings for swift projects
My usual genstrings script works well for Objective-C projects. So, when I moved to swift in my new projects, my first attempt was a little patch for find call:
find . -name "*.swift" -o -name "*.m" | xargs genstrings -o Base.lproj
This patch works, but then, suddenly, I faced this bug in genstrings which results in this error message:
Bad entry in file ./File.swift (line = 10): Argument is not a literal string.
genstings cannot parse NSLocalizedString calls with more than 2 parameters, like this: NSLocalizedString("Some String", value: "Some Value", comment: "Some Comment") (objective с equivalent is NSLocalizedStringWithDefaultValue).
Okie. Now what? You have 2 options:
Use NSLocalizedString with just 2 parameters
Use the alternatives
So. The first option is definitely not for me. I like a short dot-separated keys, that allows me to group related strings together + get rid of stupid copying of long sentences both to key and the value. There are non-apple alternatives, like swift_genstrings, genstrings2 or even DTLocalizableStringScanner. But I usually try to use as much apple-provided tools as possible.
I came across to another localization helper tool: xliff export/import. This feature was introduced in xcode6, so it’s not that new as one might think. And yes, it can be automated too!
Few experimenting resulted in two scripts for export and import of xliff files. At first sight this might look not that handy as the genstrings script. First you call export script, then edit the file manually and then call import script. But in other hand, this solution gives some benefits over genstrings solution:
You don’t use base Localizable.strings file at all. Why use it, if those strings are already present in the source code? You can keep the translations only.
Export actually grabs all of your existing traslated strings and put them into xliff file, so you will need to edit just a new/changed strings. You would do it later in strings file anyway.
All the xibs and storyboards strings goes into that single file too. No need in extra scripts that syncs new strings from IB with all the strings files. Hurrah!
xliff file is kinda standard for translators, so, in case when you work with external translators team - you won’t need to explain all the rules of translating strings file correctly. You just give them an xliff file and they will return it to you with correct translations.
Note: before running those scripts, perform export manually from the IDE once - couldn’t find out yet why it doesn’t work if the export operation were not performed there.
How to: Android XML Percent Symbol
How to: Android XML Percent Symbol
Android XML Percent Symbol
I have an array of strings in which the % symbol is used. Proper format for using the % is %. When I have a string in that array with multiple % it gives me this error.
Multiple annotations found at this line: - error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute? - error: Found tag where is expected
View On WordPress
Today: hexadecimal value 0x1F is an invalid character
This means that there is a sign in the sdlxliff that SDL Trados does not like. Actually, no XML editor would like it. No idea how it got in there in the first place, but it's easy to fix. This can happen for other signs than 0x1F too.
Just download notepad++ or any UTF-8 compatible text or XML editor.
Open the corresponding sdlxliff file (close Trados beforehand) in notepad++
Search&Replace for  and replace it with nothing (e.g. keep the replace field empty). Often there is more then one, so make sure you catch all.
Done
You should be able to open it in Trados now and create the Target Translation.
Translation/Locale Xliff based module is done
My question on Support site for LampCMS project
Hello! I know it has been a long time since the last post. I am very busy these days and only have several hours a week to work on this project. I finally finished the Translation module for this site. Translation module is done using Xliff standard. I'm sure you can Google it if you don't know what it is. The code is in the latest commit on github So far I have translated 52 strings (there has gotto be at least as many left to translate) into Russian language. I don't know any other languages and even my Russian is rusty. You can test it by selecting Russian from the drop-down menu at the bottom of this site. Anyway, the Russian translations file is a good example of how you can translate this site into any other language. You need to just copy the file from /translations/messages.ru.xlf into your own language and save the new file as /translations/messages.fr.xlf (if you going to be using French) You can also use Locale-specific translations, for example messages.en_GB.xlf Remember that .xlf files are xml files and must be a valid xml. If you want to contribute your own translations just send me a copy of your own .xlf translation file. To add more language options to your site add more locale choices to your config.ini file There is now a [LOCALES] section in it. Add something like this:
[LOCALES]
en_US = "English (United States)"
en_GB = "English (United Kingdom)"
fr_FR = "French"
fr_CA = "French (Canadian)"
de = "German"
es = "Spanish (Spain)"
ru_RU = "Russian" These will become the choices in the drop-down menu at the bottom of the pages.
Click here to post your reply
Internationalization for LampCMS using XLIFF
My question on Support site for LampCMS project
I was researching the topic of Internationalization and was considering different solutions. I was more inclined to store translation strings right in the Mongo Database. But then after looking at what other projects are using I came across something interesting. Symfony2 uses XLIFF as preferred method to store translated strings. So I looked at that XLIFF format, and I really like it. At first it looked like it would be complicated for users to create their xml files. But then I found that there are several GUI editors for XLIFF files. One of them is a plugin for Eclipse. I use Eclipse all the time anyway, that's my preferred IDE. There is also a web-based program that allows you to setup a translation project, define desired languages and let volunteers to contribute translations and at the end it creates valid XLIFF flies. I think it's really cool. So am thinking now if to use Symfony's existing Translator class or to write my own which will be more lightweight (Symfony is great but as always it can do alot more that I need for this project and most importantly it does not have one feature I really like to see). I will try to get in touch with Symfony developers and see if that can add that extra small feature I want. If it does not work out then I'll write my own Translator class.
Click here to post your reply