Questions tagged [locale]

0

votes
0

answer
5

Views

How to change language of android app ? Locale is deprecated

I have just finalized my app but getting this error on a method which changes language of app Setting.java:uses or overrides a deprecated API.Recompile with -Xlint:deprecation for details. here is my method private void setLanguage(String language){ //setting new configuration Locale locale = new L...
Viral Videos
1

votes
2

answer
162

Views

Laravel: Cannot set locale in Mailable

I updated to Laravel 5.6 and I want to use the new locale method from a Mailable class. I created a mailable class with php artisan make:mail Test --markdown="emails.test" This is my blade file: @component('mail::message') @lang('list.test') @endcomponent If I send a mail $test = new \App\Mail\Test...
Adam
0

votes
0

answer
5

Views

How to read 2 columns from excel file (xlsx) and write it to resource properties as key=value pair

I am trying to generate messages_[en/da/bg].properties file from the given set for excel (xlsx) files. Each excel sheet is provided with two columns as key-value pair. I have to read each file and write it to generate messages_en.properties file for i18n. If I have excel sheets with filenames like...
Vinay Shetty
1

votes
1

answer
955

Views

Eclipse error during remote debug session: sh: locale: not found

I'm really hoping to get an answer on this. I am using Eclipse to remote debug a C++ program on a (minimal) linux machine. I am aware that the linux machine does not have the locale binary installed. First off, the error received is the following in Eclipse after pressing the debug or run button: or...
Ryan
1

votes
1

answer
1.3k

Views

What language specifically is Chinese, language code 'zh'?

I understand that there is Simplified Chinese (zh-Hans) and Traditional Chinese (zh-Hant). However Xcode allows to localize for Chinese (zh). From the localization fallback concept I understand that it is the fallback for Simplified Chinese and Traditional Chinese. Thus is can technically be used to...
Manuel
1

votes
2

answer
44

Views

Android implement multi-language support

Best way to implement multi-language support on android 1. Using string.xml file 2. Getting language translations from server side? And have a way getting xml from backend and save in resources? Back end developer suggest me getting language translations from server.
David Galstyan
1

votes
1

answer
158

Views

std::collate::transform caused segmentation fault

When I run the following source code, got "Segmentation fault (core dumped)" at line#3 char s[] = "helloworld"; const std::collate* pc = &std::use_facet(std::locale("en_US")); std::string str = pc->transform(s, s + std::strlen(s)); std::cout
songyuanyao
1

votes
2

answer
275

Views

Understanding the strange output of java.util.Locale

I had a perception that Locale is just about adding comma at proper positions at least in case of numbers. But I see a different output for what I have tried. I tried the following, public static void main(String[] args) { DecimalFormat df = null; df = (DecimalFormat) DecimalFormat.getInstance(Local...
mtk
1

votes
1

answer
183

Views

Avoid using capturing groups in locale regular expression test?

Regular expression only for checking only if the string is valid, not for capturing any part of it: ISO 639-1 two-letter lowercase culture code and an ISO 3166-1 two-letter uppercase subculture code, or a ISO 639-1 lowercase culture code by itself. That is it, it-IT for example. I ended up (I'm not...
gremo
1

votes
2

answer
172

Views

How to create special ROOT_OPS in Template-Toolkit?

I use Locale::TextDomain in a Dancer environment with Template-Toolkit. And yes, I know Dancer-Plugin-I18N and tried it, but I don't wan't to use it! I read Defining_Custom_Virtual_Methods and adjusted it do my needs. # load Template::Stash to make method tables visible use Template::Stash; $Templat...
smartmeta
1

votes
1

answer
309

Views

ios app asian language localization

A client asked me about the effort to start localize in chinese an app that we have on the App Store. I did for other languages in the past but never for Asian languages and I'm worried that it could be a little bit trickier instead of european languages. Most of the content will be returned by REST...
Andrea
1

votes
1

answer
2.6k

Views

ZF2 Fatal error: Class 'Locale' not found

I am using ZF2 2.1.5 and trying to use the Alnum filter Zend\I18n\Filter\Alnum. I have the php_intl extention enabled in my local wamp server but still getting the error : Fatal error: Class 'Locale' not found in [root]\vendor\ZF2\library\Zend\I18n\Filter\Alnum.php on line 76 what should i do?
Exlord
1

votes
2

answer
2.2k

Views

output of TimeZone.getDefault() method

When I run the below line, System.out.println(java.util.TimeZone.getDefault()); I got the following output. sun.util.calendar.ZoneInfo[id="Asia/Calcutta", offset=19800000, dstSavings=0, useDaylight=false, transitions=6, lastRule=null] and System.out.println(Locale.getDefault()); gives `en_US` My...
MaheshVarma
1

votes
2

answer
6.6k

Views

How to get all Java supported Locales

When Google you will find lot of materials to find all the supported Locales by Java. But its all confusing. For example [http://sanjaal.com/java/tag/java-locale-tutorial/] show an output of 210 locales. But when I run the same program I get only 155. I don;t get for example ta_IN. si_LK is not out...
Ish
1

votes
1

answer
1.6k

Views

Writing UTF16 file with std::fstream

Is it possible to imbue a std::fstream so that a std::string containing UTF-8 encoding can be streamed to an UTF-16 file? I tried the following using the utf8-to-utf16 facet, but the result file is still UTF-8: std::fstream utf16_stream("test.txt", std::ios_base::trunc | std::ios_base::out); utf16_s...
1

votes
1

answer
478

Views

How to use ActiveSupport::Inflector with Cyrillic

ActiveSupport::Inflector methods like titleize, capitalize, camelize do not work with Cyrillic (Russian, Belarussian, Ukraine, ...) letters. 'xyz'.titleize # => "Xyz" # OK 'абв'.titleize # => "АБВ" # FAIL How can I use ActiveSupport::Inflector method...
freemanoid
1

votes
4

answer
1.8k

Views

Can I get a code page from a language preference?

Windows seems to keep track of at least four dimensions of "current locale": http://www.siao2.com/2005/02/01/364707.aspx DEFAULT USER LOCALE DEFAULT SYSTEM LOCALE DEFAULT USER INTERFACE LANGUAGE DEFAULT INPUT LOCALE My brain hurts just trying to keep track of what the hell four separate locale's are...
Mordachai
1

votes
1

answer
1.8k

Views

Using setLocale(LC_TIME) for localising week/month names in a website

I have a site that supports these 5 languages: English French German Italian Spanish Users can interchange between the languages as they want. I have a page that displays weekday date month in text like: Monday 12th January My code to this is: setlocale(LC_TIME, $_SESSION['lang'] . "_" . strtoupper(...
dan2k3k4
1

votes
2

answer
404

Views

How to get name of any application from its resources in English locale?

I can get the name of the application using this code: PackageInfo appInfo = pm.getPackageInfo(packageName, 0); String label = appInfo.applicationInfo.loadLabel(pm).toString(); It gives names of application in default locale. But I need in English. I also tried: int id = context.getReso...
XXX
1

votes
3

answer
1.3k

Views

Java Locale and date format

I just don't get it. There is a site that supports only English and German languages. And there is an option for a user to specify his country so that dates, numbers and other locale-specific data would appear in an appropriate format. The Locale is build as Locale locale = new Locale(lang, country)...
Osw
1

votes
2

answer
327

Views

Performant way of formatting numbers according to the user's locale with iostream?

In one part of our application there is the requirement to format numbers according to the user's locale. The interface essentially looks like this: std::string format_number(double number); The old implementation looked like this: std::string format_number(double number) { using namespace std; stat...
Martin Ba
1

votes
1

answer
178

Views

using strftime for 31 december shows next year

Using this code, setlocale(LC_ALL, 'fr_FR'); $end_date_formatted = utf8_encode(strftime("%d %B %G", mktime(0, 0, 0, $month_end, $day_end, $year_end))); strftime is not returning the right year only for Dec 31. it should display 31 decembre 2013, but it displays 31 decembre 2014
Aditya
1

votes
1

answer
622

Views

Modify main window's locale after user changes settings in Control Panel->Regional and Language Options

INTRODUCTION AND RELEVANT INFORMATION: I have MS Access 2007 database which I fill using ADO. Among other data types ( string, integer...) I also have a double. Since I work on Windows XP and use pure Win32 API to create GUI, I collect data from edit controls with GetDlgItemText API and then I con...
1

votes
3

answer
3k

Views

How to check if a character is a letter of some alphabet?

How to check in C++ if a character is a letter of some alphabet? Generally I need something like this: bool is_german(wchar_t ch); bool is_russian(wchar_t ch); bool is_japanese(wchar_t ch); and etc. EDIT 1. Can I do it without defining all charachter sets of all languages I need. Or maybe there is s...
VALOD9
1

votes
1

answer
417

Views

Why the timestamp parsed by YAML is not correct?

Yaml file: !!test.User timestamp: 2012-11-22T01:02:03.567Z Java class: package test; public class User { public Date timestamp; } Parse it with snakeyaml: String str = "2012-11-22T01:02:03.567Z"; // parse it manually Date date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").parse(str); System...
Freewind
1

votes
1

answer
56

Views

How to sort file with temporary locale in shell script?

I need to sort some files containing Chinese strings using zh_CN.utf8 while my system is in en_US.utf8. For instance I have test.csv : 4001,动词,動詞,dong4ci2 4000,不然,不然,bu4ran2 3999,规格,規格,gui1ge2 3998,抽出,抽出,chou1chu1 3997,浮水印,浮水印,fu2shui3yin4 3996,拖曳與...
Édouard Lopez
1

votes
3

answer
695

Views

Change the language of the app according to the default language of the device

I want to change the language of a my application according to the default language of the device in which the app is installed. For example: if the default language of the device is French, the user will use the app in French. I've tried to search for a solution, but probably I don't understand how...
Kurtis92
1

votes
1

answer
1.2k

Views

Node.js, Socket.io: How to get client browser-language?

I am trying to get the language the user uses in order to serve the right sound files for a playing video, using socket.io and node.js. I am a total beginner with node.js and socket.io. I got the language on client side with "navigator.language" and wanted to send it when connecting/handshaking to s...
Marc
1

votes
2

answer
1.7k

Views

Does the Android NDK support locales?

All I really want to do is format a date using strftime("%x") in the right order. On most platforms a call to setlocale("") is enough. On Android I keep getting [email protected]#$ US dates. So, does Android not support locales?
david.pfx
1

votes
1

answer
1.2k

Views

ActiveAdmin number_to_currency helper

I building a administration interface via ActiveAdmin. I have some resources like Products, at the Products i have an Article, Title, Description and Price columns. Everything working well, but i have a little problem, at the Price column i use helper number_to_currency, by default ActiveAdmin displ...
dPanda13
1

votes
1

answer
2.8k

Views

Setting UTF-8 locale for python in Ubuntu 12.04

On an Ubuntu 12.04 VM (set up using vagrant and the hashicorp/precise64 box), my locale says that I have the UTF-8 language, but python is getting a latin-1 environment. Here's what I'm seeing: [email protected]:~$ locale...
David Eyk
1

votes
1

answer
3.7k

Views

How to get format strings from ngLocale

Is there a possibility to get format strings from the ngLocale module? I need this strings for an own filter which works with moment.js-objects and moment-timezone. For example in en-us the "short"-String is "M/d/yy h:mm a", for de-de it is "dd.MM.yy HH:mm" ... Is there any way to get this strings w...
Martin
1

votes
1

answer
530

Views

SimpleDateFormat Unparseable date Error if locale is ES. Twitter “Created_At”

I'm trying to convert the twitter "created_at" to an Argentinian Date-time. If I do this: final String TWITTER="EEE MMM dd HH:mm:ss"; SimpleDateFormat sf = new SimpleDateFormat(TWITTER,new Locale("en")); It works fine. But if I change to Locale("es"), Locale("es","ES") or Locale("es","AR"), I am g...
1

votes
1

answer
613

Views

Changing the locale is modifying the text dimensions of my app

I'm trying to change the language on my Android app and I'm using this code: String languageToLoad = "en"; Locale locale = new Locale(languageToLoad); Locale.setDefault(locale); Configuration config = new Configuration(); config.locale = locale; getBaseContext().getResources().updateConfiguration(...
blackwolf
1

votes
2

answer
132

Views

generate range for which std::isalpha evaluates to true

This may be a trivial question for some, but I cannot find an appropriate answer. What I'd like is to generate a range (let's say a std::string) that contains all possible chars for which std::isalpha evaluates to true. For example, for the default locale, the string should be "A...Za...z". However...
vsoftco
1

votes
2

answer
1.1k

Views

iOS 7 Keyboard Predictions

We are adding support to our iOS 7 app to allow for Asian users. However, for keyboards using Chinese characters, there is a scroll view containing predictive text at the top of if. Once the user begins to type, a horizontal scroll view appears just above the keyboard, and is never dismissed. Is t...
Jeremy Herrero
1

votes
1

answer
1.5k

Views

Use custom Locale in Android application

EDIT: I may be wrong in my understanding, but this is a different question than Set Locale programmatically since I already implemented the answer suggested there and I still have some issues. In this questions I am asking for help in resolving that issues (issues that have no reference in the Set L...
Hanan
1

votes
1

answer
561

Views

Translate site using session in php

I try to translate my site using PHP and make it to remind the language even if the user navigate between pages and I can't do it in the way I want. The way I want is using a 'locale' folder. The main file is called index.php that can contain something like this: ..and the en.php is in "locale" fold...
Razvan Cuceu
1

votes
3

answer
908

Views

Conversion between simplified Chinese to traditional Chinese via Font swapping in iOS

I am working on a project where I need to convert simplified Chinese to Traditional Chinese and vice versa. I can do that by character mapping approach (keeping dictionary of simplified-traditional characters), but I was wondering if it is possible by simple font swapping, it should be possible to h...
Adnan Aftab
1

votes
1

answer
256

Views

GCC, std::ctype specialisation & streams

I've written my own specialisation of each virtual member function of std::ctype, so that this now works: #include #include #include "char16_facets.h" // Header containing my ctype specialisation #include #include // Implemented elsewhere using iconv std::string Convert(std::basic_string); int...
Tom

View additional questions