Kikobeats / uno-urban

Simple and Elegant personal theme for Ghost.
https://kikobeats.github.io/uno-urban
8 stars 0 forks source link

Change "days ago" into another language #6

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello Kiko,

sorry for spamming this repo. Is it possible to change the "days ago" into another language? Do I have to change the php locale to my timezone? I translated the hardcoded strings into german, but here I can't figure it out by myself. But it looks like php, right?

Thanks!

ghost commented 8 years ago

Aaaha, I found it in the uno-urban.js. I will just change it for now (I've to update it with every theme update, I know, but don't know how to do it better).

Kikobeats commented 8 years ago

Hey, no problem for report this! 😄

Unfortunately multi language is not supported (yet) in this theme. I'm waiting Ghost Apps for do this easily without blowing many code in the theme

You can use a DOM selector for change the content of the html element. You need to handle this cases:

I suppose that you can write a little regex or simple string substitution for do it.

ghost commented 8 years ago

Perfekt, thank you. Good to know, that one day multilanguage will be supported. For now I change the few strings by hand. No big deal.

ghost commented 8 years ago

Hmm, I am trying to replace the text with the DOM selector. I can add it in the code injection from ghost right? Maybe you can help me here.