Click here to Skip to main content
15,891,473 members
Everything / Globalization

Globalization

globalization

Great Reads

by Robert Hoffmann
History of globalization in ASP.NET and available options.
by Shabra
How to use Resx files to internationalize your code
by Andrea Simonassi
A simplified guide to the RFC5646 document; what is a language tag, how must be parsed, what is the IANA registry. How to implement a library, in any programming lang, to lookup user preferred language against a list of supported languages. A C# implementation is provided.
by Lance Ford
Step-by-step guide to enable an ASP.NET web application to override date, time, currency and number formats.

Latest Articles

by Lance Ford
Step-by-step guide to enable an ASP.NET web application to override date, time, currency and number formats.
by Andrea Simonassi
A simplified guide to the RFC5646 document; what is a language tag, how must be parsed, what is the IANA registry. How to implement a library, in any programming lang, to lookup user preferred language against a list of supported languages. A C# implementation is provided.
by Vipul Bhatnagar
Create a multilingual application WPF
by Cindy Potvin
How to format dates with Java in Android applications

All Articles

Sort by Title

Globalization 

6 Jan 2012 by larssy1
Hi everyone,Is there anyone who could tell me how i could define global variables which I could start using in my entire application?currently I've tried, However, it is throwing me errors obviously..:http://plaatscode.be/141545/http://plaatscode.be/141543/errors on lines 7,8,9...
6 Jan 2012 by E.F. Nijboer
The first idea that came into mind was a singleton, and surprisingly it is also the preferred method. Check out this link for more info:http://derekneely.com/2009/11/iphone-development-global-variables/[^]Good luck!
2 Oct 2012 by Stephen Hewison
Hi,We have a our own cloud which we've built and host in the UK.Currently all of our clients are based in the UK but we have opportunities to provide services to Qatar.Would it be advisable to construct a new cloud in the region of should the UK based cloud be able to adequately...
16 Sep 2011 by Martin Stevens
HiI've got a standard asp.net web app which uses globalization. All my .aspx pages inherit my "globalisation" (yes thats my class with UK English spelling to avoid any confusion) fine but I cannot get my generic handlers to inherit it. I've tried a number of variants but without success. I'm...
17 Sep 2011 by Martin Stevens
I found my own answer rather than mucking around with inheritance I created a simple class with;Imports Microsoft.VisualBasicImports System.ThreadingImports System.GlobalizationPublic Class globalisation_simple Public Sub set_thread() If...
19 Nov 2020 by Ram Kumar(Webunitech)
Hello All, I am having a few issues with setting globalization with the Chinese language with the asp.net website. We have a website in asp.net with VB.net and we have implemented the globalization English/French/Chinese language culture using a...
19 Nov 2020 by Gerry Schmitz
"Unsorted". How does anyone here know how they should be "sorted"? (Or not). Chinese uses double byte (and perhaps triple byte characters); English and French not so much. Maybe you need to consider those extra bytes, when "sorting" (or not).
6 Nov 2012 by Rui Jarimba
A collection of HTML helpers that generate DropDownLists for enums, with or without localization support.
20 Sep 2012 by Nuha IT
I had a problem with calendar in MasterPage so that's why I have used BaseClass, the problem was solved but the calendar stopped working.My calendar has a listBox for choosing different georgian calendars, but whenevr I choose I doesn't work out.This is my code for Base Classpublic...
4 Mar 2013 by mayankkarki
I am working on a metro app which provides a change language option to user, so that it changes the application language. I have used resource file for this and coded like this Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride =...
4 Mar 2013 by Jameel VM
Try this linkhttp://fromjamitoothers.blogspot.in/2012/12/globalizationdo-and-dont.html[^]Hope this helps
18 Feb 2016 by F-ES Sitecore
Use a geolocation service, google for possibilities, there are lots out there.
30 Jan 2012 by Keith Barrow
This artcle extends Part 1 to allow overriding of culture through the URL in a lightweight fashion.
7 Jun 2011 by Keith Barrow
This article provides a simple globalization mechanism for a bilingual website. Part I creates a simple bilingual website.
23 May 2013 by Marla Sukesh
In this article we will look in detail how to create a multi-lingual and multi-cultural applications using Asp.net.
10 Aug 2020 by Member 14887481
Designer resx file remains empty after adding New Resource File What I have tried: 1) Hi There, I am working on a Globalization Project, For English Translation i have added default Resource.resx file. For other language(Japanese) i have...
10 Aug 2020 by Sandeep Mewara
Either: 1. Resource designer.cs connection with your web.config file is not correctly setup OR 2. Designer file name has an extra dot Try the following: 1) Create Resource .resx file under any folder 2) set CustomTools =...
18 Dec 2012 by Dilber80
On my web site, I am using Global Resource option of ‘Globalization’. I have also created my custom library for resourceProviderFactoryType.I have following entry in my main site web.config file:-
5 Jul 2013 by Askar Imran
Well in our project we are having a requirement as to create a global class file, In each of our ASPX.cs page we have to pass the page controls (Page.Controls) to the global class file i mentioned above, and i need to disable or enable the controls in the class. This can be simply done in each...
19 Jan 2012 by Member 8317792
How to change Oracle Globalization environment to English?
23 Jan 2012 by Jörgen Andersson
Have a look at the documentation[^]
25 Feb 2013 by Tastaturbeisser
I am writing a multilanguage application. So each text for output (in C#-Code and in XAML too) has to be held in (Language-)ResourceDictionary. This works fine with plain text. E.g:
23 Feb 2013 by Irina Pykhova
maybe storing resources in .resx files will work better. Here is a simplest way to do that:add localization via resx files. It works for sure for simple strings. The only thing I didn't check is whether escaped xml tags work.
15 May 2013 by sangamesh arali
Hi,I am getting datacolumn datatype is like 05/14/2013 6:48:03 PM but i dont want time only I want to display date(05/14/2013) so please anybody help me outRegardsSangamesh Arali9591678357
15 May 2013 by NarasimhaMurthy
You can use String.Format function.String.Format("{0:MM/dd/yyyy}", "Your String goes here")
15 May 2013 by sangamesh arali
Hi,Add below code in page load event of your page then it will workCultureInfo culture = (CultureInfo)CultureInfo.CurrentCulture.Clone(); culture.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy"; culture.DateTimeFormat.LongTimePattern = ""; ...
31 Mar 2014 by Cindy Potvin
How to format dates with Java in Android applications
16 Jan 2017 by Gaurav_Chaudhary
This is the C# function which is throwing random 'System.OutOfMemoryException', public string GetFormattedDate(string datetoparse, string format = "MM/dd/yyyy") { DateTime dt; string parsedDate = ""; string[] otherValidFormats =...
19 Jan 2015 by Inimicos
I try to figure out.How to use global namespace.I have some code.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Aliasname = Boxnamespace.Bunch;namespace aliaoperator{ class Program { static...
19 Jan 2015 by CPallini
You cannot use the global namespace qualifier to resolve the namespace clash because your System.Console class de facto replaces the one in the global namespace.
23 Jun 2014 by Stephen Hewison
Hi,I've developed a globalised application which uses the Request Header information such as language to decide which country my user is from and then display a date control, amongst others, formatted with their locality settings.The issue I'm having, especially when entering into the...
23 Jun 2014 by Bernhard Hiller
No "perfect" answer possible.The users might select the language / regional settings from a menu, then you could store that in a cookie and apply when they visit again. Of course, that won't work with the first visit.Also users might configure their browsers with other languages being...
4 Feb 2021 by atulonweb@gmail.com
I am implementing globalization and localization in dot net core. I am following below link from microsoft. Globalization and localization in ASP.NET Core | Microsoft Docs[^] It is working perfectly fine. My website is has layered architecture...
7 Aug 2017 by UnStable Messi
hello guys i'm using globalization and localization in my application. i'm using 2 cultures english and arabic, all the things are working perfectly but i'm facing issue in Date in a list to records populated in JQuery Datatable when my application is in english then the date is showing...
6 Aug 2017 by Kornfeld Eliyahu Peter
That because the local for your Arabic culture displays dates according to the Islamic calendar (with a little bug)... The 21/08/2017 is the 29th of Hijja 1438... Hijja is the 12th month of the Islamic calendar (with zero based it comes to 11) and because of the bug of 1900-2000, 38 displayed as...
7 Aug 2017 by Jochen Arndt
Gregorian 21/08/2017 would be Hijri 29/11/1438. So you got a wrong year. This may be sourced by using a date format internally that is Gregorian and does not support "old" dates (and it might also print "invalid" when the conversion creates invalid Gregorian dates). A possible solution might...
17 Jun 2014 by Vipul Bhatnagar
Create a multilingual application WPF
1 Aug 2017 by UnStable Messi
hello guys. i'm using Globalization and Localization in my Asp Net Mvc project.. i'm facing an issue in it. the lables in my view. when these are marked through razor like @Html.LabelFor(m=>m.Name) then after change to arabic it's change the name to arabic. but if i use traditional labels...
1 Aug 2017 by Ben J. Boyle
No, straight HTML will not update. HtmlLabelFor passes through a localization aware process and can update the strings based on the selected locale, but a hardcoded HTML string does not.
24 Sep 2013 by Stephen Hewison
Hi,Does the concept of a tick / cross checkbox reach globally?Or should I be providing different visuals for different cultures?
24 Sep 2013 by Sergey Alexandrovich Kryukov
Thank you for clarifications (please see the discussion in comments to the question).This is a serious complex questions. The difference between cultures is usually highly underestimated, especially in the West. At the same time, if I understand anything about world cultures (and I, as a...
23 Mar 2013 by RogerDeNIro
Hi,i need help for my problem.i will create an *.dll which includes all graphical resources. The WinForm Project get the *.dll is depends.Thats work well but when i change something on the *.dll it doesnt work anymore.in attachment the sample project.When somebody can...
24 Mar 2013 by RogerDeNIro
@ThePhantomUpvoter:you are right, so here the project details, chane the archive and hope with the virustotal scan someone helps me
8 Dec 2011 by Michael Groeger
I am trying to control whether digits get displayed as native digits on systems having an arabic culture.To be precise, I try to avoid using native digits, because the display string contains a value that is identifying a radio access technology: 3G.But the DigitSubstitution property...
1 Feb 2014 by JOHNNYDEMICHAEL
I have a DateGridView1 instantiated in Form1 (by Visual C#).I want it to be global . . . I want to access its cells from every class (I made a new one) in app.I thought it would be accessible from all classes if I changed the generated code from private to public . . .public...
1 Feb 2014 by Baxter P
Select the DataGridView and open the properties window. Then set the 'modifiers' property to 'Public'.That should do it.If you try to access the DataGridView from anywhere in the application you may have some problems though.
1 Feb 2014 by Karthik_Mahalingam
In order to make is as Global access, you need to change the access modifier of the DataGridView1 as Public or InternalTo access the DataGridView1 in other classes you need to create an instance for the DataGridView1 Form (Form1)public class V{ public void Somemethod(){Form1 obj...
19 Feb 2014 by JOHNNYDEMICHAEL
Thanks, but I could not get any of the suggestions to work. I substantiated it in the class outside of any method.
19 Feb 2014 by Krunal Rohit
Let's say you're having GridView in Deafault.aspx and you want to access it on Page1.aspx, Page2.aspx and Page3.aspx.So what you can do is, make a public property for it and with the help of page instance you can call that Grid.For example,Default.aspxpublic GridView MyGrid{ ...
5 May 2014 by Member 10702891
Hi thereI am VERY new to programming on a whole and this is my first question so please go easy on me. I have searched everywhere for a solution but nowhere seems to deal with the same situation.Basically, I am one of two developers working on the same project. I have just completed the...
6 Mar 2015 by Blake Allen
My Code:import timeimport sysauthenticating="authenticating"check_verification="verifying username and password......"#sets player username and passwordprint "Welcome to the game."def set_player_credentials(): player_username=raw_input("Set username:") ...
6 Mar 2015 by Sergey Alexandrovich Kryukov
Let me summarize:You have to 1) define variables, 2) if the variable is defined, it cannot be used in outer scope. Not only it is impossible, but it makes no sense. Such variables are stored on the call stack and simply don't exist between calls, its memory is re-used after the frame stack...
6 Mar 2015 by Richard MacCutchan
You could use basic file I/O to store your details, see https://docs.python.org/3.3/library/csv.html[^] for one possible way. Remember though that the content of a .csv file will not be secure, as it is simple text, so anyone can read it. For proper security you should use some form of database,...
18 Nov 2013 by akhil.krish
hai,I am developing one website which is using more then 20 pages... Please I want Globalization using master page...Any help.?
18 Nov 2013 by Orcun Iyigun
Here is a tutorial in C# which explains how to apply Globalization using master page:Implement Globalization in Asp.Net[^]The following 2 from CP:Developing an ASP.NET page with MasterPage and Localization[^]Master Page Globalization[^]Good luck,OI
2 Mar 2016 by vJay Yadav
I am testing my application in UK timezone (UTC) Dublin, Edinburgh, Lisbon, London.The DST (Daylight saving time) in UK starts on Last Sunday of March i.e. 27-Mar-2016.I am passing unix timestamp to Javascript Date object. It display normal date time but when UK DST is in effect, the time is...
2 Mar 2016 by DotNetSteve
Check out this js library:Moment.js | Home[^]andMoment Timezone | Home[^]
2 Oct 2013 by Shashi_zen
Hi,i want to capture all mouse click event anywhere in the windows [means global mouse events] and suppress its action.using following code i can suppress the mouse click events in my application's form only not outside of the my app form :protected override void WndProc(ref Message...
3 Oct 2013 by Richard MacCutchan
How to set a Windows hook in Visual C# .NET[^].
14 Jan 2014 by Ali Agha
i am developing a multi-lingual application allowing users to change language as well as keyboard layouts (through combobox). I am able to change the culture of application successfully but i'm unable to change the individual keyboard layouts e.g. for English (United States), im unable to change...
14 Jan 2014 by Ron Beyer
MSDN Sample - Change Keyboard Layout in C#[^]I know its similar to what you posted, but I have a feeling that your issue is in obtaining the correct input language. See the linked example for something that works and see where the difference is in your code.
21 Jan 2013 by Member 9660753
I want to change the language of content in error message(String) which is being shown in pop up window. How can i change it ?
14 Dec 2011 by mmvr2k11
Hi,I would like to change my web site from one language to other languages i.e English to German, French, Hindi, etc.If anybody knows please help me.Thanks in advance.
14 Dec 2011 by Ryan Zahra
Did you try to search before posting here?Check this great article: http://www.codeproject.com/KB/dotnet/Localization.aspx
14 Dec 2011 by Mohankumar.Engain
refer this link.http://msdn.microsoft.com/en-us/library/bz9tc508.aspx[^]
14 Dec 2011 by Uday P.Singh
check this article:Creating multilingual websites - Part 1[^]hope it helps :)
14 Dec 2011 by thatraja
Check thisHow to create multi languages page in asp.net[^]
14 Dec 2011 by ujjwal uniyal
use this script. this is google translator. it will work fine for you. :)function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');}
9 Mar 2015 by spark bell
Hi All can anyone here post code to create asp.net application with globalisation.I mean Application Globalisation in Asp.Net .I want sample codeThanks
9 Mar 2015 by Afzaal Ahmad Zeeshan
You can get help from Google, to search for some good resources online. This one is from MSDN, and provides and overview of globalization and localization in ASP.NET, https://msdn.microsoft.com/en-us/library/c6zyy3s9%28v=vs.140%29.aspx[^] read all of the sections inside. Secondly, here...
9 Mar 2015 by spark bell
Thanku for your response what i actually want here is simple sample code so that i can work by myself for complex 1
27 Sep 2011 by omid.nazifi
Hi to ExpertsI want to design a DB for several language, but I have question?In This DB there are user information that saved to several languages.for example:UserID, FirstName, LastName, BiographyHow to I design it?thanks a lot
27 Sep 2011 by Not Active
I can't imagine you mean things like first name and last name would be localized. For columns such as biography you would need to create another table with columns such as; Id, lcid, text, where I'd is of course the identifier for this table, lcid is the language code and text is the localized...
27 Sep 2011 by omid.nazifi
You are telling me that I design the database as follows:CREATE TABLE UserName(UserID int IDENTITY PRIMARY KEY NOT NULL) CREATE TABLE Language (LanguageID int IDENTITY PRIMARY KEY NOT NULL,LanguageDescription varchar(50) NOT NULL) CREATE TABLE UserAttrib (UserID int NOT NULL...
27 Sep 2011 by Jörgen Andersson
Your database design needs another change. Use NVarchar instead of Varchar, as it allows the use of unicode for characters.
27 Jun 2013 by thanh_bkhn
I have some classes like thisclass A{public: B *b; C *c;};class B{};class C{};I have some global variables, that is used in A, B and C class. I know using global variables is unsuitable for maintenance, so I'm considering converting to local variables. I'm...
27 Jun 2013 by H.Brydon
Your class structure is a little puzzling. It seems to me that the int value(s) really might belong in A and then B and C instances refer to an instance of A (in the constructor). [The value(s) in A should then be private with a 'get' accessor.]If this is not the case and you really need...
27 Jun 2013 by Stefan_Lang
The decision where a variable belongs shouldn't be based on "ease of access", but on actual association. You didn't specify what these local variables are for, and what property they describe, but at the heart of avoiding global variables is the realization that almost every variable describes...
27 Jun 2013 by «_Superman_»
I would recommend creating a separate class to hold the variables.Access to the variables could be given using methods instead of directly.You could also make the variables and methods static to avoid having to create an object of the class.
27 Jun 2013 by Freak30
An alternative would be to keep the variable local in A and pass a reference to B and C in their constructor. Then B and C store the reference and use the same variable. This is closer to a global variable but it is only known between the 3 classes. It would look like that:class A{ B...
20 Feb 2014 by hemantwithu
I have a web application which should be Localized to 3 languages. All the controls are taking the control text from the Resx file of that language. Now I have scenario like suppose if we have a messages,custom error messages to show for that particular culture. So for this I have created a...
20 Feb 2014 by RahulMGunjal
check http://stackoverflow.com/questions/1508570/read-string-from-resx-file-in-c-sharp[^]
11 Dec 2016 by abdul subhan mohammed
Hi guys,I have created one web and windows based application and these both applications are in multilingual langauges(English, Arabic, Hindi, Philiphinne).This application is created for ExamCenters.In which they will create Exam Session. When Exam Sessions are created, the date &...
11 Dec 2016 by Jochen Arndt
Always use UTC when storing and comparing dates and times. Only when displaying them, they may be converted to local time. If the clients are displaying (e.g. using JavaScript), convert the UTC time passed from the server to local time.If the server is displaying, it needs...
11 Dec 2016 by Andy Lanng
Anything you do on the server side (in the c# code) will take the server time.Please perform a quick search either in the forums or in google before posting here:How to get the date time of client PC in asp.net C#?[^]
10 Oct 2011 by inayat basha
Hi, I am showing a text to the user. But i want to show the resource name. for example:Executed commandI want show the Executed Command in different languages. so anyone can help me...regarding...
10 Oct 2011 by André Kraak
Have a look at these:Globalization and localization demystified in ASP.NET 2.0[^]Declarative ASP.NET globalization[^]ASP.NET Globalization and Localization[^]
13 Oct 2011 by inayat basha
I found the answer... " runat="server"> Regards,Basha...
9 Jul 2012 by Paulo Morgado
How to make XAML Content Globalizable when using value converters
7 Jan 2014 by akhil.krish
iam using multi-language website... my problem is alert message.... how to write code...all ready iam using javascript for alert message... Code:ScriptManager.RegisterStartupScript(Me, [GetType](), "ShowMessageScript", "alert('Resources.Resource.lbldelmsg');", True)this ...
7 Jan 2014 by JoCodes
Refer http://forums.asp.net/t/1742430.aspx[^]http://www.codemag.com/article/0503081[^]Hope this helps
7 Jan 2014 by Gitanjali Singh
string message = GetGlobalResourceObject("ResxfileName","KeyName");string script = String.Format( "alert('{0}');", message);cs.RegisterStartupScript(csType, csName, script); have you tried this?
13 Jan 2014 by TrushnaK
try like this:-details:-GlobalMessages:- global message file namemsgBoxInvalidUserId:- alertbox name in that global resource fileuse like below:-message = Resources.GlobalMessages.msgBoxInvalidUserId ScriptManager.RegisterClientScriptBlock(Me.Page, GetType(String), "AltBox1",...
1 Nov 2016 by Andrea Simonassi
A simplified guide to the RFC5646 document; what is a language tag, how must be parsed, what is the IANA registry. How to implement a library, in any programming lang, to lookup user preferred language against a list of supported languages. A C# implementation is provided.
11 Jun 2013 by cpquest
Hi all,I was working on a project which uses Prism 4.0 Framework. I had a requirement to monitor all my actions across my application which mean any command is executed by the application should be monitored. I have heard about IActiveAware interface which provides monitoring the commands...
23 Dec 2012 by lavjain
When I use Global.asax file for url rewriting purposes, I use Application_BeginRequest and follow up the code :protected void Application_BeginRequest(object sender, EventArgs e) { //Get the current http context HttpContext InRequest =...
24 Dec 2012 by Herman<T>.Instance
RewritePath according to MSDN makes a new request:See http://msdn.microsoft.com/en-us/library/system.web.httpcontext.rewritepath.aspx[^] First line in text:Redirects a request for a resource to a different path than the one that is indicated by the requested URL. RewritePath is used in...
31 Jan 2013 by chandramani P.
Hello Friends, I am new to the MVC3.0. I am working on the Project for both the English and the Arabic Layout. When I am posing the url without any query-string, Globalization works fine. But when I am having url in English with query string...
18 Nov 2015 by Aravinth G
I am trying localisation in js file using i18n-js gem.in i18n-js.ymltranslations: - file: "app/assets/javascripts/i18n/%{locale}.js" only: ['cust_details', 'order_details']I am trying to load only 'cust_details' and 'order_details' into translation file and split them per...