Questions tagged [localization]

Use this tag for reviews of code that addresses localization/globalization concerns, which make an application be displayable in multiple languages.

Filter by
Sorted by
Tagged with
0 votes
1 answer
378 views

how to make inputs work well with special characters using the locale.h library? [closed]

for some reason the function setlocale(LC_ALL, "English") doesn't work when using an input function,(getchar, scanf, fgets,..), to get a special character, (Ç, ã, õ, é,...). ...
Eduardo Nunes's user avatar
6 votes
1 answer
208 views

Custom manipulator for changing at what characters a std::istream split words

Introduction By default, input streams (e.g., std::cin or a std::istringstream) split words at space when using the ...
L. F.'s user avatar
  • 9,456
0 votes
1 answer
742 views

JavaScript - Difference between two dates in days or less [closed]

I have 2 dates that I would like to have the difference between them in days and if less than a one day simply show "less than a day". ...
Mouad Ennaciri's user avatar
9 votes
2 answers
2k views

Translating LaTeX documents into different languages using DeepL API

I'm coming from C and C++ and have often troubles using Python's full potential. This is a script I wrote to translate LaTeX documents into different languages. A parser replaces all latex specific ...
Mr.Sh4nnon's user avatar
4 votes
2 answers
107 views

Simple locale loader

I have a class that loads locales from a database. I'm not sure if locale is the right word. It's basically loading texts for a game, generic sayings like alerts and error messages. I'm also not sure ...
Josh Hallow's user avatar
  • 1,305
3 votes
1 answer
244 views

Multilingual app without localizing

I'm making an iOS app which supports multiple languages but not in the built-in localized way. In iOS, for localization to work, the user has to change the device's language. But in the app I'm ...
Isuru's user avatar
  • 331
3 votes
1 answer
1k views

Including ResourceBundle in enum in order to display enum constant name in different languages [closed]

I'm working on spring web application which has to be accessible both in polish and english. So generally, it's all about internationalization. Of course, internationalization is based on getting ...
MateuszMateusz's user avatar
2 votes
1 answer
943 views

Localization class in C++

I have created simple localization system for my app. What do you think, is there something "off" Header: ...
Martin Perry's user avatar
2 votes
2 answers
352 views

Finding an arbitrary word in a string of words given an offset

Background Given a string (s) and an offset into that string (offset), find the whole word that can be found at the given ...
Dave Jarvis's user avatar
  • 1,897
12 votes
1 answer
2k views

CultureInfo with fallback routing to another language

Our company needs a localization/translation behavior which allows incomplete (ResX) resources. If a String isn't available in italian fall back to the next roman language, like french fall back to ...
Kelon's user avatar
  • 223
1 vote
1 answer
370 views

A localization helper in codeigniter

I created a project to better understand CI3, while developing it I tried to introduce localization elements. When I tried to localize the view everything messed up. I made a helper to identify if the ...
germanosk's user avatar
1 vote
1 answer
1k views

C++ conversion from std::string to arithmetic type using std::locale::classic()

I recently had a bug where extracting a decimal from a string failed due to locale settings. That is, some locales use a , as a decimal point, rather than a ...
Jamerson's user avatar
  • 303
6 votes
1 answer
3k views

Localized Enum in C# 6

I had to jump through some hoops to get a localized enum working. I went through dozens of SO articles that never actually answered the relevant conundrum with a working solution. So I made my own: I ...
Randy's user avatar
  • 487
2 votes
1 answer
5k views

Getting translated string using reflection and Resource Manager

I wrote the following code to get the translated string from Resource Manager. The method GetTranslatedString is called more than 50 times in my project. ...
kudlatiger's user avatar
7 votes
1 answer
195 views

Resx Translation Helper, V.2.0

Related to Resx Translation Helper, V.2.0 Remove Files Window First, I implemented the changes suggested in my last question, then I changed my entire code base to support editing 1-N Resx files. So,...
user avatar
10 votes
4 answers
1k views

Resx Editor in WPF

To aid in the localization of .resx files, I made a generic resx comparer that allows you to edit the values of the resx's. Also, this is my first proper adventure in WPF (I've just been using ...
user avatar
11 votes
2 answers
150 views

The multilingual duck

So, we have this "Rubberduck Settings" window, with a number of "tabs" dedicated to each configurable feature. The "root" tab contains the application's "general settings" and, in the next release, we'...
Mathieu Guindon's user avatar
16 votes
2 answers
3k views

Localizing an enum in Java

I am currently using an enum in my Android application to display time periods: Weekly Bi-Weekly Monthly Quarterly Yearly I created the enum like this, because I wanted to know the description, and (...
AdamMc331's user avatar
  • 383
2 votes
2 answers
2k views

Lightweight localization for a Cordova app

I had been trying to find a suitable solution to implement localization in my Phonegap/Cordova application. My search proved that any localization through seperate .xml or .json files was a nightmare (...
Matthijs's user avatar
  • 153
4 votes
3 answers
131 views

PHP Bilingual Error System Ideas

I am building a php based mobile website that must be in both Spanish and English. This is my first bilingual site so I've been having to re-think a lot of coding practices I currently use to ...
McGee.WIll's user avatar
7 votes
3 answers
349 views

Parsing dates from an OCR application

I wrote this code to parse dates from the output of the OCR, which means that the obtained date can be literally anything, so I put some restrictions in place: Date is the the format of: ...
skiwi's user avatar
  • 10.6k
5 votes
1 answer
773 views

String algorithms and locale

I am trying to write some string algorithms which I want to work for any kinds of strings and/or locale. I managed to get some results that do work, but I am not sure that what I am doing is idiomatic ...
Morwenn's user avatar
  • 19.9k
5 votes
2 answers
8k views

WPF Localisation - using resx

I have a small WPF application which I'm not exactly localizing, but not hard-coding resources either. I know WPF doesn't use .resx files for that purpose, but I exposed the resource strings as public ...
Mathieu Guindon's user avatar
4 votes
2 answers
5k views

Working with Locales in Swing (with change at runtime)?

I thought about the best way to implement localisation with runtime in Swing. I currently solve the problem like that: ...
nidomiro's user avatar
  • 139
4 votes
2 answers
978 views

Extension methods for translation engine

Our application uses some singletons for localized strings. These calls used to be long and dirty. Therefore some co-worker created extensions for the int and ...
Myrtle's user avatar
  • 528