Wednesday, August 10, 2011

Another update, more translations in XLIFF file

My Question on Support site for LampCMS project

Just pushed another update to github

Fixed a bug that prevented new registrations. It had to do with the new translation module. It works now.

Also added more translation strings to the russian translations file. It's in /translations/messages.ru.xlf
It now contains 92 translated strings.
This file should be used as template for translating this site into any other language or other locale.

All you have to do is copy that file to messages.fr.xlf (if you translating into French for example), then just replace all russian strings with French translations - keep the original English strings unchanged.

I think there are about 70 more strings left to translate, including all messages that are sent by email like after the registration, after the password changed, etc.

By the way, translation objects are cached for best performance. So if you add or update the translation .xlf file you need to clear cache. I just added the new controller for that.

If you logged in as administrator you will see a new link "Clear Cache" in "Settings" Just click on it and it will remove all data from cache. This is safe to do and not a big deal, new files will be re-generated and cached as needed.

One extra bonus is that now the ACL object (access control) is also cached and it usually saves about 5-10 milliseconds because it's no longer required to read acl.ini file to generate the ACL object. If you added new permissions or edit acl.ini file you will also need to clear cache.

My goal is of cause to have all strings on the site to be accessed via Translator object, no hard-coded strings should be left on the site.

Anyways, you can get to latest from github as usual.

I'm not planning any more major features, maybe only one more - "whose online" feature, you know, to show whos' currently online and possibly what they are doing - like reading this question, viewing tags, asking question and stuff like that.

Click here to post your reply


1 comment:

  1. Hi! To better translate your strings, my recommendation is to try a collaborative translation management platform like https://poeditor.com/ that can simplify the workflow.

    ReplyDelete