forked from nikhilk/scriptsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResourceFile.cs
More file actions
32 lines (25 loc) · 870 Bytes
/
Copy pathResourceFile.cs
File metadata and controls
32 lines (25 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ResourceFile.cs
// Script#/Core
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//
using System;
using System.Collections;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Text;
namespace ScriptSharp {
internal static class ResourceFile {
public static string GetLocale(string fileName) {
string extension = Path.GetExtension(fileName);
if (String.Compare(extension, ".resx", StringComparison.OrdinalIgnoreCase) == 0) {
fileName = Path.GetFileNameWithoutExtension(fileName);
extension = Path.GetExtension(fileName);
if (String.IsNullOrEmpty(extension) == false) {
return extension.Substring(1);
}
}
return String.Empty;
}
}
}