w.omar
(W Omar)
November 4, 2020, 10:28am
1
How could i use the german numericFormat, also i use like this
numericFormat: {
pattern: ‘0,0.00 $’,
culture: ‘de-DE’, // use this for EUR (German),
// more cultures available on http://numbrojs.com/languages.html
}
It just show me the US Format
the Euro Symbol is not necessary, but where can i change “1,000.00” to “1.000,00”.
Hi @w.omar
this demo https://jsfiddle.net/AMBudnik/kL2whmxe/ with
type: 'numeric',
numericFormat: {
pattern: '$0,0.00',
culture: 'en-US' // this is the default culture, set up for USD
},
is used to set up a language in Vanilla applications. Do you use any JS Wrapper (Angular, React, Vue)?
w.omar
(W Omar)
November 4, 2020, 12:25pm
3
yes i use Angular, i don’t know where i should look for the language.
Let me create a sample code for you, @w.omar . It should be ready for tomorrow.
1 Like
I was able to create a demo. I’ve removed the node_modules to keep it lighter. You can download the app the here https://we.tl/t-1LpxwYblEn
Generally, everything is just set up in the component.ts file. I’ve made a full set (language + culture) for de-DE
import { Component } from '@angular/core';
import Handsontable from 'handsontable';
import 'handsontable/languages/de-DE';
import numbro from "numbro";
import languages from "numbro/dist/languages.min";
numbro.registerLanguage(languages['de-DE']);
numbro.setLanguage('de-DE')
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
language = 'de-DE';
languages = Handsontable.languages.getLanguagesDictionaries();
title = 'demo';
tableSettings: {};
ngOnInit(){
this.tableSettings = {
data: [[3.90,5,5],[6,7,8]],
rowHeights: 30,
contextMenu: true,
language: 'de-DE',
columns: [{
type: 'numeric',
numericFormat: {
pattern: '0,0.00 $',
culture: 'de-DE' // use this for EUR (German),
// more cultures available on http://numbrojs.com/languages.html
}
}, {}, {}]
}
}
}
w.omar
(W Omar)
November 5, 2020, 7:59am
6
It works finally, thank you aleksandra =)
Great. Thank you for update @w.omar
If you’d need anything feel free to send me a message - support@handsontable.com
1 Like