Skip to content

Conversation

@nechutny
Copy link

@nechutny nechutny commented Sep 3, 2015

Hi,

I've implemented little change that allow translating texts. For example "Add ..." was hardcoded in source. Now is optional config value - for example in Czech: { texts: {add: "Přidat" } }. English is of course still default and don't need any change.

@romainsalles
Copy link

Depending of the language, the "Add" text can be placed before of after the new entity.

I think you should pass a method, not a text :

{
  'option_create': function(data, escape, texts) {
    return '<div class="create">'+ texts.create(escape(data.input)) +'</div>';
  },
  texts : {
    "create": function(input) {
      return 'Add <strong>' + input + '</strong>&hellip;';
    }
  }
}

@joallard
Copy link
Member

joallard commented May 9, 2016

Thank you. We're integrating a more rigid i18n solution in core in #16. Stay tuned for this feature!

@joallard joallard closed this May 9, 2016
@joallard joallard mentioned this pull request Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants