1. #1
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default I18n in Ext4

    I18n in Ext4


    Ext4 will have localizable settings for the following defaults (which are in Ext.util.Format)

    thousandSeparator: ',',
    decimalSeparator: '.',
    currencyPrecision: 2,
    currencySign: '$'

    Can someone post some info on what they should be in other locales? I know about the Euro zone, but there are a lot of other local files who's currency and conventions I do not know.

    The idea being that I18n for number formatting and currency amount formatting should be completely seamless in Ext4.

    Thanks.

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  
    Last edited by brian.moeskau; 4 Dec 2010 at 9:49 PM. Reason: fixed link
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I have made a "best effort" set of localization changes for all locale files which exist in the Ext4 source.

    All EU countries which use the Euro have the Euro sign. Others, I found from here: http://www.xe.com/symbols.php

    Re the thousand separator and decimal separator, I assumed that mainland European countries use "." to separate thousands and "," as the decimal point.

    Beta testers will have to report if their locale file has an incorrect assumption which may well be the case!

    So to format a currency amount in the local currency (from the included locale file), just use

    Code:
    Ext.util.Format.currency(totalCost);
    Or, to use a known currency:

    Code:
    Ext.util.Format.currency(totalCost, '$', 2); // Use the dollar sign, format with two decimals.
    Likewise, date formatting should default to local conventions. The Ext.util.Format.date function, and the default Column renderer provided by Ext.util.Format.dateRenderer will output a date formatted according to the default in the locale file.

  4. #4
    Ext User
    Join Date
    Feb 2010
    Location
    Klaipėda
    Posts
    16
    Vote Rating
    0
    mdmitry is on a distinguished road

      0  

    Default


    Being able to choose currency position (prefix or suffix) would be nice.

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    That's in.

    The default is

    Code:
    Ext.util.Format.currencyAtEnd: false
    Which means currency sign (or currency string for some, like 'kr') is prefixed.

    If you want it at the end, that will be set to true.

    All locales leave the default unchanged now.

    What locales require the currency string at the end?

  6. #6
    Ext User
    Join Date
    Feb 2010
    Location
    Klaipėda
    Posts
    16
    Vote Rating
    0
    mdmitry is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    What locales require the currency string at the end?
    In Russia, Lithuania and probably most other ex-USSR countries currency is put after the number. It's not a requirement, just nobody ever writes it as a prefix. IMO there should be possibility to change it at the currency level, not just as a global setting.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,499
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Yes, the Ext.util.Format.currency method looks like

    Code:
            currency: function(v, currencySign, decimals, end) {
    So you'd use

    Code:
    Ext.util.Format.currency(123.45, "R", 2, true);
    To output it at the end.

    Actually, should I default it to putting the symbol at the end for the ru locale?

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Export from Java DecimalFormatSymbols:
    Code:
    Code	Country/Language	ISO	Curr.	Dec.	Group.
    ja-JP	Japanese (Japan)	JPY	¥	.	,
    es-PE	Spanish (Peru)	PEN	S/	,	.
    en	English	XXX	¤	.	,
    ja-JP	Japanese (Japan,JP)	JPY	¥	.	,
    es-PA	Spanish (Panama)	PAB	B	.	,
    sr-BA	Serbian (Bosnia and Herzegovina)	BAM	КМ.	,	.
    mk	Macedonian	XXX	¤	,	.
    es-GT	Spanish (Guatemala)	GTQ	Q	.	,
    ar-AE	Arabic (United Arab Emirates)	AED	د.إ.‏	.	,
    no-NO	Norwegian (Norway)	NOK	kr	,	 
    sq-AL	Albanian (Albania)	ALL	Lek	,	.
    bg	Bulgarian	XXX	¤	,	 
    ar-IQ	Arabic (Iraq)	IQD	د.ع.‏	.	,
    ar-YE	Arabic (Yemen)	YER	ر.ي.‏	.	,
    hu	Hungarian	XXX	¤	,	 
    pt-PT	Portuguese (Portugal)	EUR	€	,	.
    el-CY	Greek (Cyprus)	EUR	€	,	.
    ar-QA	Arabic (Qatar)	QAR	ر.ق.‏	.	,
    mk-MK	Macedonian (Macedonia)	MKD	Den	,	.
    sv	Swedish	XXX	¤	,	 
    de-CH	German (Switzerland)	CHF	SFr.	.	'
    en-US	English (United States)	USD	$	.	,
    fi-FI	Finnish (Finland)	EUR	€	,	 
    is	Icelandic	XXX	¤	,	.
    cs	Czech	XXX	¤	,	 
    en-MT	English (Malta)	EUR	€	.	,
    sl-SI	Slovenian (Slovenia)	EUR	€	,	.
    sk-SK	Slovak (Slovakia)	SKK	Sk	,	 
    it	Italian	XXX	¤	,	.
    tr-TR	Turkish (Turkey)	TRY	YTL	,	.
    zh	Chinese	XXX	¤	.	,
    th	Thai	XXX	¤	.	,
    ar-SA	Arabic (Saudi Arabia)	SAR	ر.س.‏	.	,
    no	Norwegian	XXX	¤	,	 
    en-GB	English (United Kingdom)	GBP	£	.	,
    sr-CS	Serbian (Serbia and Montenegro)	CSD	CSD	,	.
    lt	Lithuanian	XXX	¤	,	 
    ro	Romanian	XXX	¤	,	.
    en-NZ	English (New Zealand)	NZD	$	.	,
    no-NY	Norwegian (Norway,Nynorsk)	NOK	kr	,	 
    lt-LT	Lithuanian (Lithuania)	LTL	Lt	,	 
    es-NI	Spanish (Nicaragua)	NIO	$C	.	,
    nl	Nederlands	XXX	¤	,	.
    ga-IE	Irish (Ireland)	EUR	€	.	,
    fr-BE	French (België)	EUR	€	,	.
    es-ES	Spanish (Spain)	EUR	€	,	.
    ar-LB	Arabic (Lebanon)	LBP	ل.ل.‏	.	,
    ko	Korean	XXX	¤	.	,
    fr-CA	French (Canada)	CAD	$	,	 
    et-EE	Estonian (Estonia)	EEK	kr	,	 
    ar-KW	Arabic (Kuwait)	KWD	د.ك.‏	.	,
    sr-RS	Serbian (Serbia)	RSD	RSD	,	.
    es-US	Spanish (United States)	USD	US$	.	,
    es-MX	Spanish (Mexico)	MXN	$	.	,
    ar-SD	Arabic (Sudan)	SDG	ج.س.‏	.	,
    in-ID	Indonesian (Indonesia)	IDR	Rp	,	.
    ru	Russian	XXX	¤	,	 
    lv	Latvian	XXX	¤	,	 
    es-UY	Spanish (Uruguay)	UYU	NU$	,	.
    lv-LV	Latvian (Latvia)	LVL	Ls	,	 
    iw	Hebrew	XXX	¤	.	,
    pt-BR	Portuguese (Brazil)	BRL	R$	,	.
    ar-SY	Arabic (Syria)	SYP	ل.س.‏	.	,
    hr	Croatian	XXX	¤	,	.
    et	Estonian	XXX	¤	,	 
    es-DO	Spanish (Dominican Republic)	DOP	RD$	.	,
    fr-CH	French (Switzerland)	CHF	SFr.	.	'
    hi-IN	Hindi (India)	INR	रू	.	,
    es-VE	Spanish (Venezuela)	VEF	BsF.	,	.
    ar-BH	Arabic (Bahrain)	BHD	د.ب.‏	.	,
    en-PH	English (Philippines)	PHP	Php	.	,
    ar-TN	Arabic (Tunisia)	TND	د.ت.‏	.	,
    fi	Finnish	XXX	¤	,	 
    de-AT	German (Austria)	EUR	€	,	.
    es	Spanish	XXX	¤	,	.
    nl-NL	Nederlands (Nederland)	EUR	€	,	.
    es-EC	Spanish (Ecuador)	USD	$	,	.
    zh-TW	Chinese (Taiwan)	TWD	NT$	.	,
    ar-JO	Arabic (Jordan)	JOD	د.أ.‏	.	,
    be	Belarusian	XXX	¤	,	 
    is-IS	Icelandic (Iceland)	ISK	kr.	,	.
    es-CO	Spanish (Colombia)	COP	$	,	.
    es-CR	Spanish (Costa Rica)	CRC	C	.	,
    es-CL	Spanish (Chile)	CLP	Ch$	,	.
    ar-EG	Arabic (Egypt)	EGP	ج.م.‏	.	,
    en-ZA	English (South Africa)	ZAR	R	.	,
    th-TH	Thai (Thailand)	THB	฿	.	,
    el-GR	Greek (Greece)	EUR	€	,	.
    it-IT	Italian (Italy)	EUR	€	,	.
    ca	Catalan	XXX	¤	,	.
    hu-HU	Hungarian (Hungary)	HUF	Ft	,	 
    fr	French	XXX	¤	,	 
    en-IE	English (Ireland)	EUR	€	.	,
    uk-UA	Ukrainian (Ukraine)	UAH	грв.	,	.
    pl-PL	Polish (Poland)	PLN	zł	,	 
    fr-LU	French (Luxembourg)	EUR	€	,	 
    nl-BE	Nederlands (België)	EUR	€	,	.
    en-IN	English (India)	INR	Rs.	.	,
    ca-ES	Catalan (Spain)	EUR	€	,	.
    ar-MA	Arabic (Morocco)	MAD	د.م.‏	.	,
    es-BO	Spanish (Bolivia)	BOB	B$	,	.
    en-AU	English (Australia)	AUD	$	.	,
    sr	Serbian	XXX	¤	,	.
    zh-SG	Chinese (Singapore)	SGD	S$	.	,
    pt	Portuguese	XXX	¤	,	.
    uk	Ukrainian	XXX	¤	,	.
    es-SV	Spanish (El Salvador)	SVC	C	.	,
    ru-RU	Russian (Russia)	RUB	руб.	,	 
    ko-KR	Korean (South Korea)	KRW	₩	.	,
    vi	Vietnamese	XXX	¤	,	.
    ar-DZ	Arabic (Algeria)	DZD	د.ج.‏	.	,
    vi-VN	Vietnamese (Vietnam)	VND	đ	,	.
    sr-ME	Serbian (Montenegro)	EUR	€	,	.
    sq	Albanian	XXX	¤	,	.
    ar-LY	Arabic (Libya)	LYD	د.ل.‏	.	,
    ar	Arabic	XXX	¤	.	,
    zh-CN	Chinese (China)	CNY	¥	.	,
    be-BY	Belarusian (Belarus)	BYR	Руб	,	 
    zh-HK	Chinese (Hong Kong)	HKD	HK$	.	,
    ja	Japanese	XXX	¤	.	,
    iw-IL	Hebrew (Israel)	ILS	ש"ח	.	,
    bg-BG	Bulgarian (Bulgaria)	BGN	лв.	,	 
    in	Indonesian	XXX	¤	,	.
    mt-MT	Maltese (Malta)	EUR	€	.	,
    es-PY	Spanish (Paraguay)	PYG	G	,	.
    sl	Slovenian	XXX	¤	,	.
    fr-FR	French (France)	EUR	€	,	 
    cs-CZ	Czech (Czech Republic)	CZK	Kč	,	 
    it-CH	Italian (Switzerland)	CHF	SFr.	.	'
    ro-RO	Romanian (Romania)	RON	LEI	,	.
    es-PR	Spanish (Puerto Rico)	USD	$	.	,
    en-CA	English (Canada)	CAD	$	.	,
    de-DE	German (Germany)	EUR	€	,	.
    ga	Irish	XXX	¤	.	,
    de-LU	German (Luxembourg)	EUR	€	,	.
    de	German	XXX	¤	,	.
    es-AR	Spanish (Argentina)	ARS	$	,	.
    sk	Slovak	XXX	¤	,	 
    ms-MY	Malay (Malaysia)	MYR	RM	.	,
    hr-HR	Croatian (Croatia)	HRK	Kn	,	.
    en-SG	English (Singapore)	SGD	$	.	,
    da	Danish	XXX	¤	,	.
    mt	Maltese	XXX	¤	.	,
    pl	Polish	XXX	¤	,	 
    ar-OM	Arabic (Oman)	OMR	ر.ع.‏	.	,
    tr	Turkish	XXX	¤	,	.
    th-TH	Thai (Thailand,TH)	THB	฿	.	,
    el	Greek	XXX	¤	,	.
    ms	Malay	XXX	¤	.	,
    sv-SE	Swedish (Sweden)	SEK	kr	,	 
    da-DK	Danish (Denmark)	DKK	kr	,	.
    es-HN	Spanish (Honduras)	HNL	L	.	,

  9. #9
    Ext Premium User
    Join Date
    Mar 2007
    Posts
    89
    Vote Rating
    1
    Luc is on a distinguished road

      0  

    Default


    Hi,

    Perhaps the Common Locale Data Repository is useful for localization efforts of Ext4.

    Luc

  10. #10
    Ext User
    Join Date
    Feb 2010
    Location
    Klaipėda
    Posts
    16
    Vote Rating
    0
    mdmitry is on a distinguished road

      0  

    Default


    Quote Originally Posted by Animal View Post
    Actually, should I default it to putting the symbol at the end for the ru locale?
    Yep, that would be great.

Similar Threads

  1. New Application Architecture in Ext4
    By westy in forum Community Discussion
    Replies: 3
    Last Post: 24 Nov 2010, 8:35 AM
  2. Extjs and i18n
    By wceuppens in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 6 Jan 2010, 7:16 AM
  3. DateField i18n
    By extjs_bugmenot in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 15 Oct 2009, 1:40 AM

Thread Participants: 8

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi