Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shortcomings of l20n.js for web projects

52 views
Skip to first unread message

Francesco Lodolo

unread,
Jan 10, 2017, 11:17:12 AM1/10/17
to tools...@lists.mozilla.org
Hi,
While watching l20n being used in the wild for Test Pilot, I noticed a
few shortcomings when l20n.js is used for this kind of projects. I
wonder if there are ways to work around them, if it's just me being
confused on how things work, or if l20n (in its JavaScript
implementation) might just not be the best choice for a website.

*No JavaScript*
Users visiting the website without JavaScript enabled will get a
warning that can't be localized with l20n. Besides that, the website
would be pretty much useless anyway (no text, assuming templates don't
have any English content and just data-l10n-ids).

*Search engine visibility*
Assuming bots get past the no-JS obstacle, search engines will never
see other languages.

*Users can't pick a different language*
This is the most important one: there are no permalinks, so I can't
choose to visit testpilot/fr and get the French version of the
website. And nce I'm on the website, I can't change my language if I
end up with the wrong language.

For example, there are plenty of cases where I don't want the Italian
version of a website, because translations don't make any sense (e.g.
flight check-ins). Changing my accept-language to get that is not
really an option.

Francesco

Matjaz Horvat

unread,
Jan 10, 2017, 11:46:42 AM1/10/17
to Francesco Lodolo, tools...@lists.mozilla.org
On Tue, Jan 10, 2017 at 5:17 PM, Francesco Lodolo <fl...@lodolo.net> wrote:

> *Users can't pick a different language*
> This is the most important one: there are no permalinks, so I can't
> choose to visit testpilot/fr and get the French version of the
> website. And nce I'm on the website, I can't change my language if I
> end up with the wrong language.
>
> For example, there are plenty of cases where I don't want the Italian
> version of a website, because translations don't make any sense (e.g.
> flight check-ins). Changing my accept-language to get that is not
> really an option.
>

This is the site implementation detail, so in your case it's an issue on
the Test Pilot side.

Locale-specific URLs and language selectors can be implemented regardless
of the i18n/l10n lib being used. Besides, with l20n.js you can even do that
without changing any backend code.

-Matjaž
0 new messages