This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import locale | |
| import datetime | |
| locale.setlocale( locale.LC_ALL, 'en_US' ) | |
| // va afficher : '$188518982.18' | |
| locale.currency( 188518982.18 ) | |
| // va afficher '1,255,000' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CultureInfo ci = CultureInfo.CurrentCulture; | |
| string money = 120.ToString(“c”,ci); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string myDate = DateTime.Now.ToString(ci); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require_once 'I18Nv2.php'; | |
| $locale = &I18Nv2::createLocale('en_US'); | |
| echo "Format a currency value of 2000: ", | |
| $locale->formatCurrency(2000, I18Nv2_CURRENCY_INTERNATIONAL), "\n"; | |
| echo "Format todays date: ", | |
| $locale->formatDate(null, I18Nv2_DATETIME_FULL), "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Culture culture = CultureInfo.CurrentCulture ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| locale_get_default() | |
| // ou | |
| Locale::getDefault() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| l = locale.getdefaultlocale() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ResourceBundle rb = ResourceBundle.getBundle("myBundle", currentLocale); | |
| String message = rb.getString("string1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $rb = new ResourceBundle('root', "./locale"); | |
| echo resourcebundle_get($rb, 'string1'); | |
| ou | |
| echo $r->get('string1'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import gettext | |
| print _("Hello, World!") |