Last post Feb 16, 2011 03:47 AM by sandy060583
Feb 15, 2011 04:53 PM|DrZ3D|LINK
i have a website that use globalization to several languages (VB Framework 4.0)
i need to get all languages exist in App_GlobalResourses directory because i don't know in future the website owner will add or remove some languages
for that i try to access in App_GlobalResources folder and i list the existing files in there now i have an array of fileInfo but i don't know how can i get some part of the file name
it return "General.resx", "General.en-US.resx", "General.fa.resx" and so one....
can you please let me know how can i get the string between two dot?
Feb 15, 2011 05:46 PM|mbanavige|LINK
you could do it like this:
Dim case1 As String = "General.en-US.resx"
Dim case2 As String = "General.resx"
Dim parts As String() = case1.Split("."c)
Dim culture As String
If parts.Length = 3 Then
'for cases such as: "General.en-US.resx"
culture = parts(1)
'for cases such as: "General.resx"
culture = String.Empty
Feb 16, 2011 03:47 AM|sandy060583|LINK
hi use split method of string .
split string with . character so u will get max 3 strings now u can verify string which will have culture of the file name .
Hope this will help !!!