Archived copy of A Swedish wolf in Norway

Miscellaneous technobabble from a Swede in Norway.

Updating language files for Opera 9

Published: 2006-03-23 09:03:58

The weekly build from this Monday introduces a new, incompatible, numbering scheme for language strings in Opera. This was done due to internal changes in Opera, the numeric identifiers are now automatically assigned based on the identifiers used internally in Opera, rather than sequentially from a common pool of numbers.

This change helps us in such a way that we can work in parallel adding language file in a much cleaner fashion than before, but unfortunately also means that Opera 9 will be incompatible with all previous language files. In a way, this is good, as using an older language file can cause problems, but is also bad as it causes all the unofficial translations to stop working, and puts the people providing these files in a problematic position when they want to update the translation to a newer version.

For this purpose, I have written a script that remaps the language file from the old numbering system to the new one. It is a simple Perl script that reads the old language file and changes all the numbers over to the new one. If you do not, or cannot, use Perl, you should still be able to make use of the remapping table.

Update: read about the changes in the 24th March weekly

Tags: browsers opera translation


I've updated the custom language file I use (russian.lng) to use new string IDs. But Opera still complains file is not compatible with Opera version when I try to choose Russian in preferences. Renaming russian.lng to english.lng works fine though - menues are in russian and no complaints displayed.
Is it a regression or intentional behavior? How do I make Opera load non-english.lng file?
(Of cause, I've updated DB.version, Build.Win, Version.Win in there to match those of english.lng)

That is a known bug, the routine to check if the language file is too old will reject any file in the latest weekly build. Meanwhile, you can either use opera:config or edit the ini file manually to point to the new file.

Thank you very much for the script ;)

nafmo, as you may have noticed I have converted the old 8.52 oficial files (34 of them) to the new strings in build 8303. I'd just like to know if you can check one of them looking for possible errors. I compared side by side the old and the new but I may have forgotten some.

What happens to the Opera buttons all over the WWW ?
All people who published them must now distinguish between before and after build 8303 ?

Opera 9 does support remapping the old identifiers for buttons, toolbar and menu configuration files, etc. It's just the language files that need to be updated. The support for old identifiers might go away eventually, though, so at some point you should upgrade your provided buttons, toolbars or menus.

Peter, your perl script worked very good in this location (Linux)
thank you :)

Note for people that have problem using it :
I converted the Opera-8.5x French .lng file doing :

1) Conversion :
- DL Peter's perl script
- put the script along with new english.lng & 8.5x French lng files in a directory that has user read & write rights
- Then launched the script :
$ perl ouw852_fr.lng
It will stop at each lines existing in the old .lng file but not in new 9.0 english.lng file. Therewhile I edit the old file doing :
$ gvimdiff english.lng ouw852_fr.lng --> erase those lines.

This way, every comment is preserved, on opposite to Abilio_KID (otherwise very good) localized files :)

2) Update resulting ouw852_fr.lng.remap files with new 9.0 content :
$ gvimdiff english.lng ouw852_fr.lng --> Change version & add new lines using powerfull gvimdiff features
$ mv ouw852_fr.lng ouw90_fr.lng

3) Make Opera 9.0 use the new ouw90_fr.lng :
# mv ouw90_fr.lng /usr/share/opera/locale/

In Opera, type opera:config in the URL box, expand "User Prefs" & @ "Language File", browse to /usr/share/opera/locale/ouw90_fr.lng
Restart Opera.
Now you got everything back to French in your Opera 9.0 :D

Le fichier de langue en français pour Opera 9.0 sera disponible rapidement sur le tutoriel Opera que je tiens à jour ;)

Upgrading ?

If people use different Opera versions you must provide 2 buttons instead of one. That's horrible for all the people who develop toolbars for download by toolbar.ini or direct download by opera:button-link

I have question: why in 8321 is newer numbering?

Yes, 8321 needs another mapping... When will it come to an end?
And will you provide a new script for recent changes?

Fabian writes:

Would it be possible to make this Perl script operate on-line somewhere, so we can run it in a web-based environment? Upload old file, copy the conversion from a textarea or something?

The numbering hasn't really changed in the latest build, not at least if you count like a computer. The difference is that the value is now treated as a signed 32-bit integer instead of a unsigned 32-bit integer.

can someone tell me how to remap old .lng file in XP environment?

What happens with 8321 LNG? I'm about the strings with leading '-' symbols. Is it preparing for lng cleanup in next build or it means something else?

unal writes:

Should we change our language file's related lines to "-" value?

Mario writes:

Remapping for me required to remove some lines (most of them about licensing) from the language file (de), then the remapping script ran through, but still opera didn't accept the remapped file.

What I had to do manually is to change the Version.Linux line in the [Info] section from 8.50 to 9.0. Maybe you can add this to your perl script.

Mongoose, anonymous: Please see the followup post for details on the negative numbers.

anonymous: The remapping script only lists strings that are currently available, it will fail if you try to remap a language file with removed strings.

i've removed some old string and the great perl script worked smoothly. thanks !

nadav :-)


Can someone please remapp croatian language file
and send me remapped file to info (at)

I don't have/understand Perl. :insane: Thx!

zih3r: I removed the strings that has been removed since 8.51, and fixed the file encoding (it was UTF-16 but stated ISO 8859-1, I've fixed it to use UTF-8). Download.

Yes, this is it! ;)
Thank you! Now I must add few new lines and this will be wonderful! And collect new Opera users of course, here in Croatia! :D

How come opera 9b1 (archive opera-9.0-20060411.5-shared-qt.i386-en.tar.bz2) on linux (suse-10.0 and slackware-10.2) refuses to accept (valid) language file remapped in this manner, if langfile is pointed to in UI dialog, telling something like "language file is not for this version of opera", but accepts this same langfile if pointed to via "-language " start parameter?

Yury_T: That shouldn't happen. Could you please file a bug report and send the problematic language file to the e-mail address you are provided after submitting it?

Done, the bug #217630.

Thank you.

The script isnn't downloadable because url isn't found.
Is there a new download link?

This was originally posted on My Opera at
Please note that links may be outdated and any information included here may be obsolete.

← Paying respects | Tweaking the language file format → | Back to the post index | Back to the archive index | Peter's homepage