|
|
||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
11-22-2009, 01:42 PM
|
#1 |
|
Member
|
Post rating: rate
For the English people this doesn't do anything, but I noticed that windows version appeared in my language in first time I ran it on wine, so I wanted the same for the Linux version.
I think the $LANG environment variable is UNIX wide but not sure 100%, anyways if there is no $LANG variable English is assumed, so systems without it stay with the previous behavior: Code:
Index: src/arch/ArchHooks/ArchHooks_Unix.cpp
===================================================================
--- src/arch/ArchHooks/ArchHooks_Unix.cpp (revision 28235)
+++ src/arch/ArchHooks/ArchHooks_Unix.cpp (working copy)
@@ -160,7 +160,17 @@
RString ArchHooks::GetPreferredLanguage()
{
- return "en";
+ RString locale;
+
+ if(getenv("LANG"))
+ {
+ locale = getenv("LANG");
+ locale = locale.substr(0,2);
+ }
+ else
+ locale = "en";
+
+ return locale;
}
void ArchHooks_Unix::Init()
Code:
David Santamarķa Rogado (howl) (1):
ArchHooks_Unix: Follow user's system language as default.
Last edited by howl; 11-22-2009 at 01:52 PM.. Reason: Removed identation with spaces with identation with tabulator. |
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| language patch | dragsteur[BW] | General questions | 0 | 06-08-2009 06:28 PM |
| Installed songs not working after selected | Eako | Song and Course questions | 3 | 03-13-2009 04:08 PM |
| SM4 crashed when i selected a theme | xcandlexcorex | Crash questions | 2 | 07-31-2008 06:24 AM |
| When SM4 becomes Alpha/Beta, should it have a full Japanese language patch? | Dark Coz | General StepMania | 3 | 06-13-2008 10:04 PM |
| Getting a lower grade on scorescreen than previous grade | Bludjinni | General questions | 7 | 12-16-2006 07:36 PM |