Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a module for locale format preferences #2

Open
rmottola opened this issue Jan 22, 2024 · 0 comments
Open

Write a module for locale format preferences #2

rmottola opened this issue Jan 22, 2024 · 0 comments
Assignees

Comments

@rmottola
Copy link
Member

rmottola commented Jan 22, 2024

Get the default from Language resource database:
https://github.com/gnustep/libs-base/blob/master/Resources/Languages

Edit principal constants:
https://github.com/gnustep/libs-base/blob/master/Headers/Foundation/NSUserDefaults.h

  baseBundle = [NSBundle bundleForClass:[NSObject class]];
  NSLog(@"base bundle: %@", baseBundle);
  langPath = [[baseBundle bundlePath] stringByAppendingPathComponent:@"Languages"];
  NSLog(@"langpath %@", langPath);
  langArray = [NSMutableArray arrayWithArray:[fm directoryContentsAtPath:langPath]];
  NSLog(@"lang array: %@", langArray);
  [langArray removeObject:@"Locale.aliases"];
  [langArray removeObject:@"Locale.canonical"];
  [langArray removeObject:@"Locale.encodings"];
  NSLog(@"lang array: %@", langArray);

  langDictDB = [NSDictionary dictionaryWithContentsOfFile:[langPath stringByAppendingPathComponent:[langArray objectAtIndex:0]]];
  NSLog(@"langDb: %@", langDictDB);  
@rmottola rmottola self-assigned this Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant