Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate the website [$50 awarded] #37

Closed
danirabbit opened this issue Jan 9, 2015 · 13 comments · Fixed by #288
Closed

Translate the website [$50 awarded] #37

danirabbit opened this issue Jan 9, 2015 · 13 comments · Fixed by #288

Comments

@danirabbit
Copy link
Member

danirabbit commented Jan 9, 2015

We should probably get this set up sooner than later


The $50 bounty on this issue has been claimed at Bountysource.

@ghost
Copy link

ghost commented Jan 10, 2015

Yes, I agree - it's always been a PITA to add translations after all the strings have been hardcoded into the page in the past. It's probably worth discussing how we should go about this (considering we're now not using any sort of framework or server side language (yet)).

@danirabbit
Copy link
Member Author

I imagine we should probably go with some solution that works with a github plugin for translations. Anybody have any leads on that sort of thing?

@PhillipSz
Copy link
Contributor

maybe we should just use something like: elementaryos.org/de or elementaryos.org/fr and then link to these pages? Would be a quick fix, even if that's really static :) Or what about http://i18next.com/ ?

@jishnu7
Copy link

jishnu7 commented Jan 12, 2015

What about https://github.com/wikimedia/jquery.i18n ?

@quassy
Copy link
Contributor

quassy commented Jan 25, 2015

Using jQuery / Javascript in general for i18n sounds like a bad idea.

If the site uses PHP without frameworks I think it would be most sensible to use the built-in functions for gettext. Templates can stay almost the same, only that every to-be-translated <?php echo "English string"; ?> has to be replaced by <?php echo _("English string"); ?> (or <?=_( "English string" )?> if you prefer it short, and enable shortcodes). GNU gettext is pretty much standard and there are a whole bunch of (including web) apps for it, but you can also edit the files with a text editor if you feel desperate.

@tajnymag
Copy link

As a temporary solution I'd agree with PhillipSz with the "elementaryos.org/lng". We would also have it easier to use the translated strings later.

@davidak
Copy link

davidak commented Jan 27, 2015

much projects use Transifex, like ownCloud https://www.transifex.com/projects/p/owncloud/

it is free for open source-project. the interface is more modern than launchpad. but why not using launchpad, if you use it for the apps?

also, the localization should happen on server-side that the client simply get's a plain html file.
i hope you have caching like varnish to speed it up and don't have to apply the localization on every request. that saves lot's of resources on the webserver!

php gettext using a php extension seams to be the standard.

tl;dr
http://stackoverflow.com/questions/12731105/is-gettext-the-best-way-to-localise-a-website-in-php-only-mild-localisation-ne
http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/
http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/

@tajnymag
Copy link

But if we used the local manual translation, we could easily deal with currency convertion and translated "hero" screenshots.

@inputsh
Copy link

inputsh commented Jan 28, 2015

Please don't use Launchpad for the translation of the website. Choose Transifex or local translations. Both of them are much easier methods than the constant "something went wrong" errors we get on Launchpad.

@lewisgoddard
Copy link
Member

Launchpad translations make no sense for a GitHub hosted project. They were never being seriously considered.

@danirabbit danirabbit changed the title Translate the website Translate the website [$50] Jan 29, 2015
@Murazaki
Copy link

I understand that there is Weblate and WebtranslateIt that integrates well with Github (they are in the service hooks). Weblate is simple but seems to handle a lot of file types, and PHP files as well : http://docs.weblate.org/en/latest/formats.html#php-files

@martpie
Copy link
Collaborator

martpie commented Jan 29, 2015

Laravel uses a nice system:

a template:

<?php echo trans('users.noaccess'); ?>

lang/fr/users.php:

return array(
   'noaccess'      =>   "Vous n'êtes pas autorisé à faire ça.",
   ...

);

still hardcoded in some ways, but it works pretty well. Just to give ideas.

@emersion emersion mentioned this issue Jan 29, 2015
@emersion
Copy link
Collaborator

Working on it, see #288

@danirabbit danirabbit changed the title Translate the website [$50] Translate the website [$50 awarded] Feb 21, 2015
@lewisgoddard lewisgoddard modified the milestone: Perfect Translation Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.