[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String translation in setup.pl?

At the moment I'm evaluating our translation experience and one thing I'm finding is that we've marked all strings for translation in setup.pl and dependent code (notably Upgrade_Tests.pm).

However, there's no possibility to select another language than the default language in setup.pl, unless we start parsing the HTTP Accept-Language heading. [The same could be said for the front-page -- login.pl.]

What's the next step? Do we remove the translations from the lexicon, or do we parse the Accept-Language header and fall back to that when there's no user detected?

In IRC (irc://chat.freenode.net/ledgersmb), we went over the various options here, leading to the creation of an issue to record the outcome in order to help anyone picking up this task.

We came to the conclusion we want the language to be determined in this order (first to last):

1. Take the language value from a query string "lang" parameter
2. Use the user's configured language preference when logged in *and* the user saved a language pref
3. Use a LedgerSMB server-wide configured language, if one is configured (default: no config)
4. Use the request's "Accept-Language" header, if present
5. Fall back to the built-in language ('en')

This is also recorded in issue #1187 (https://github.com/ledgersmb/LedgerSMB/issues/1187)



http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
Ledger-smb-devel mailing list