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

[Epic] Ghost and i18n #3801

Closed
ErisDS opened this Issue Aug 16, 2014 · 17 comments

Comments

Projects
None yet
@ErisDS
Member

ErisDS commented Aug 16, 2014

Project description: Ghost is currently pretty much UK-based English-language only, and has barely any features to account for timezones, locales, languages, alphabets, keyboard layouts or anything else that isn't UTC/English in either the admin or in themes. Even the USA folks luck out, sorry! All this is set to change with full support for multiple locales and languages across the admin and your blog posts. Throughout the Ghost GitHub, support for all of these sorts of features is referred to as i18n (internationalisation).


Currently, Ghost effectively doesn't work properly unless you're writing in English or something very similar. Throughout the application, from the ember admin, to the API and even down to themes there are things missing which make it hard to use Ghost if you aren't English speaking.

This issue is intended as a placeholder to keep track of all the different places where we know we need to add i18n support so that it becomes possible for anyone to publish content comfortably in their own language and locale.

i18n for Ghost falls into 2 broad categories

1. Publish content in your language/locale

We need to make it possible for anyone to create a blog and publish content which is 100% in their language. This includes extending theme helpers, adding support for non latin-standard chars in URLs and other files, and many other things.

2. Use Ghost in your language/locale

Much less important, it would be great for our users if they could have the admin UI appear in their language, with a tailored layout and specific fonts.

Features and Support

The following is a list of things we know we need to do / make possible / add support for:

Publishing
  • Level 1: blog language setting
  • Level 2: post language
  • customisable permalinks where english words are used
  • set <html lang="?">
  • add language output in JSON/LD
  • non-latin chars in slugs
  • non-latin chars in urls
  • non-latin chars when uploading files
  • non-latin chars handled by words and characters features of excerpt/content helpers
  • non-latin chars in generated heading id attributes
  • non-latin chars supported fully in editor
  • customisable permalinks for /tag/, /author/, and /page/ urls
  • locale dates in themes (moment.js language support)
  • different plural structures in the {{plurals}} helper
  • extensible rules for what constitutes paragraphs and words in the excerpt and content helpers
  • extensible rules for what constitutes paragraphs and words in the editor
Admin UI
  • translate the Admin UI
  • locale dates when entering published at date
  • register different fonts for use in the admin interface and specifically the editor
  • extend the admin interface with layout tweaks for different languages
  • install language packs which provide the translations and layout tweaks
  • non-latin chars handled by word count and counters on bio/description fields
  • ability to include extra character sets in admin via language packs

i18n and Apps

Not all features and support for other languages will exist in core. Different writing systems require very different layouts and as such it should be expected that if your language is significantly different to English, that an App may be required to make Ghost work for you.

The advantage of splitting functionality this way is that we don't have to design one UI that works for all languages and writing systems. Furthermore we don't have to bloat the core of Ghost with features that will only ever be used by one specific group. Language packs which add translations for the Ghost admin UI could also add layout tweaks, better fonts, and other modifications to make Ghost work just as well for other languages as it does for English.

@ErisDS ErisDS added this to the Future milestone Aug 16, 2014

@ErisDS ErisDS added i18n labels Aug 16, 2014

ErisDS added a commit to ErisDS/Ghost that referenced this issue Aug 16, 2014

Removing prototypal i18n code
refs TryGhost#16, TryGhost#17, TryGhost#18, TryGhost#19, TryGhost#20, #21, TryGhost#3801

- This code was a prototype system built when Ghost was still a prototype.
  It was never fully implemented and hasn't actually worked for ages.
- Now that the admin is in Ember, it's likely we'll need a very different
  system.

@ErisDS ErisDS changed the title from Ghost and i18n to [Edit] Ghost and i18n Aug 17, 2014

@ErisDS ErisDS changed the title from [Edit] Ghost and i18n to [Epic] Ghost and i18n Aug 19, 2014

@ErisDS ErisDS added the feature label Sep 2, 2014

morficus pushed a commit to morficus/Ghost that referenced this issue Sep 4, 2014

Removing prototypal i18n code
refs TryGhost#16, TryGhost#17, TryGhost#18, TryGhost#19, TryGhost#20, TryGhost#21, TryGhost#3801

- This code was a prototype system built when Ghost was still a prototype.
  It was never fully implemented and hasn't actually worked for ages.
- Now that the admin is in Ember, it's likely we'll need a very different
  system.
@halfdan

This comment has been minimized.

Member

halfdan commented Oct 14, 2014

FormatJS looks like a nice solution for i18n: http://formatjs.io/

@evantill

This comment has been minimized.

evantill commented Nov 25, 2014

On Discourse they are using Transifex.
On the translator side (I help translating into French), this tool is very nice to use.

And it seems to be free for open source projects.

@HLFH

This comment has been minimized.

HLFH commented Dec 12, 2014

Transifex seems the best solution. I used it for Wallabag and ownCloud projects. Please create your repo, and I'll be happy to translate Ghost in French & German.

@ErisDS

This comment has been minimized.

Member

ErisDS commented Jan 5, 2015

We're looking for someone to lead up the i18n development project: https://ghost.org/contribute/i18n-lead/ - making it possible to translate the Ghost admin, as well as helping us find solutions to many other i18n related problems listed out in this issue.

crepererum added a commit to crepererum/CasperPatched that referenced this issue Jan 15, 2015

Add lang attribute to html element
This enables hyphens and text2speech. Without this responsible mobile
layout is only partial activated. Especially on small screens,
hyphenation can improve readability. Also text2speech is only supported
by most software when the language of the content is know. So setting
the `lang` attribute also improves accessibility.

Using `en` as a default language makes sense because the template is
English as well. Users of other languages might want to change this.

TODO: Change hardcoded language to templated attribute when i18n is
supported. See [#3801](TryGhost/Ghost#3801)
for more details.
@ErisDS

This comment has been minimized.

Member

ErisDS commented Jun 2, 2015

Anyone & everyone following along with this should read and get involved with the proposals outlined here: #5345

morficus added a commit to morficus/Ghost that referenced this issue Jul 24, 2015

foundation work for server-side i18n support:
* ref TryGhost#5345 and TryGhost#3801
* creating helper methods for dealing with i18n initialization, polyfill and string+compilation
* initial structure for server-side JSON language file

morficus added a commit to morficus/Ghost that referenced this issue Jul 24, 2015

foundation work for server-side i18n support:
* ref TryGhost#5345 and TryGhost#3801
* creating helper methods for dealing with i18n initialization, polyfill and string+compilation
* initial structure for server-side JSON language file

morficus added a commit to morficus/Ghost that referenced this issue Jul 27, 2015

foundation work for server-side i18n support:
* ref TryGhost#5345 and TryGhost#3801
* creating helper methods for dealing with i18n initialization, polyfill and string+compilation
* initial structure for server-side JSON language file
@anyong

This comment has been minimized.

anyong commented Jul 29, 2015

What is the current status on setting a post as a specific language/locale?

@ErisDS ErisDS modified the milestone: Future Backlog Oct 9, 2015

@aludvigsen

This comment has been minimized.

aludvigsen commented Nov 19, 2015

How far away are the i18n support for Ghost?

@yusf

This comment has been minimized.

yusf commented Dec 13, 2015

@aludvigsen The task is marked as stalled in the Trello roadmap.

@PunKeel

This comment has been minimized.

PunKeel commented Dec 28, 2015

👍 Would love this :(

@faustvault

This comment has been minimized.

faustvault commented Sep 9, 2016

Don't know if this is an appropriate place for this, but I saw those, who were looking to solve the date language issue on posts. Go figure, this is the workaround:
open core/server/helpers/ghost_head.js and before module.exports = ghost_head; line add something like moment.locale('ru');

@Tyriar

This comment has been minimized.

Tyriar commented Sep 17, 2016

Not sure if this is included in "Level 2: post language" but I would like to be able to have multiple version of a single post in different languages, and Ghost would serve up the appropriate version depending on the user's locale (with the ability to override).

@Mindsers

This comment has been minimized.

Mindsers commented Oct 20, 2016

I'm agree with @Tyriar. This is the only functionality I missing since I've been on Ghost

@maxkoryukov maxkoryukov referenced this issue Oct 22, 2016

Open

EPIC: about translation #11

11 of 14 tasks complete
@Nettsentrisk

This comment has been minimized.

Nettsentrisk commented Mar 9, 2017

Stopped using Ghost about a year ago due to only being able to use it for English-based sites. Still no progress? :(

@HLFH

This comment has been minimized.

HLFH commented Mar 9, 2017

@Nettsentrisk No progress since November 2012.

@yusf

This comment has been minimized.

yusf commented Mar 9, 2017

As a Ghost Kickstarter backer I can't help but feeling a little left out not being able to use Ghost in production even once, because of the lack of localization.

@ErisDS

This comment has been minimized.

Member

ErisDS commented Mar 10, 2017

I understand the replies here come from a place of frustration and a desire to see this implemented, however the comments here are achieving the opposite effect.

Anyone who comes to this issue with the intention of contributing will be put off by the negativity in the comments. This article does a great job of explaining what it feels like being a maintainer on GitHub. It is extremely demotivating to put in tonnes of work only to have people rock up to GitHub to moan about all the things we haven't done or got wrong.

Moving forward:

This is an enormous issue, relating to 3 different concepts that people commonly mix up:

  • translating the admin UI
  • localising a theme
  • being able to publish content in multiple languages

We have said these aren't features the core team plan to build in the near future, instead looking for people from the community to lead the effort. We had a page on ghost.org dedicated to it for over a year, and we've had an #i18n channel in Slack for even longer.

If you want to see this implemented, then contribute something. Positivity, ideas and encouragement are all contributions. Rally together a group of people who could make this happen, use the tools we've provided and work with us to affect a change.

For now - I am going to close this issue. It serves only as a beacon of frustration for a feature set that does not exist, and that really belongs on https://ideas.ghost.org. If an individual or group wants to work on one of the 3 aspects of locatisation/internationalisation, we can raise a new issue to cover the spec of what they want to build, as happened with #5345.

@ErisDS ErisDS closed this Mar 10, 2017

kirrg001 added a commit that referenced this issue Jan 9, 2018

Theme translations and blog localisation (#8437)
refs #5345, refs #3801

- Blog localisation
  - default is `en` (English)
  - you can change the language code in the admin panel, see TryGhost/Ghost-Admin#703
  - blog behaviour changes depending on the language e.g. date helper format
  - theme translation get's loaded if available depending on the language setting
  - falls back to english if not available

- Theme translation
  - complete automatic translation of Ghost's frontend for site visitors (themes, etc.), to quickly deploy a site in a non-English language
  - added {{t}} and {{lang}} helper
  - no backend or admin panel translations (!)
  - easily readable translation keys - very simple translation
  - server restart required when adding new language files or changing existing files in the theme
  - no language code validation for now (will be added soon)
  - a full theme translation requires to translate Ghost core templates (e.g. subscriber form)
  - when activating a different theme, theme translations are auto re-loaded
  - when switching language of blog, theme translations are auto re-loaded

- Bump gscan to version 1.3.0 to support more known helpers

**Documentation can be found at https://themes.ghost.org/v1.20.0/docs/i18n.**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment