Filestack - Does the file picker allow languages other than english? - file

I am writing a Javascript application for watermarking a photo. I want to know if the Filestack file picker supports languages other than English.

If you are using the Filepicker you can specify language in the 'lang' parameter of the pick function.
In order to make Spanish the default language for a picker you could use the following:
client.pick({
lang: 'es'
})
More languages are listed on the documentation https://www.filestack.com/docs/javascript-api/pick-v3

I was working for German Language, You can do this.
filepicker.picker({lang: "de"}).open()
with this your modal will look like this.
enter image description here

Related

reactjs i18n change translation on demand

I use i18n (react-i18next) in my react js application. Translation with language chooser etc works absolutly fine.
But now I want to change some texts programmatically on demand.
I tried this:
i18n.t('clinical:sde.export.studyTitle', {lng: "en"})
and
i18n.t('clinical:sde.export.studyTitle', {"en"})
It always returns the german string from current setting and not the "on demand" english text. Is there a solution to solve this?
Thanks in advance.
Your code should work, you need to check that the dynamic language is loaded (this what i18n.changeLanguage does).
I've made a simple test, and it works.
https://codesandbox.io/s/react-i18next-example-forked-ueng1?file=/src/app.js

AngularJS: Need language information in angularjs from language code

In android, I am able to retrieve the language information from the language code itself using Locale class as shown below.
Locale locale = new Locale("fr");
locale.getDisplayName(locale); // Français
locale.getDisplayName(Locale.ENGLISH)); // French
I need the above information to be retrieved in angularjs from the language code alone. Is it possible to retrieve in HTML directly ?
A little late on this one, though there is a native API for this, window.Navigator.language.
For example:
console.log(window.Navigator.language); // 'en-US'

Angular Translate: Use different fallback languages for specific locales

I want to support translations between e.g. different versions of English, but have a common fallback.
The following is an example of how the setup could be:
locales/en_AU.json
locales/en_US.json
locales/en.json
locales/fr_BE.json
locales/fr_FR.json
locales/fr.json
...
I want to have e.g. some Australian specific strings in en_AU.json, but have the rest in en.json.
In code I would like something like:
$translateProvider.fallbackLanguage(['en_*' : 'en', 'fr_*' : 'fr'])
Or to generally attempt to fallback to whatever is before the underscore.
I would also like to have a general fallback language
Is there a way to accomplish this?
I ended up listening for language changes, and if the new language key contained an underscore (eg. da_DK), I changed the fallback stack to be ['da','en'] and the called refresh.
$translate.use(languageKey);
// Check if language has a country code and add general language as fallback along with English
if (languageKey.indexOf('_') !== -1) {
$translate.fallbackLanguage([languageKey.substring(0,languageKey.indexOf('_')), 'en']);
}
$translate.refresh();
I'm using partial loaders and it didn't work for me initially. It loaded the language I changed to OK, but not the extra fallback language. The last $translate.refresh() was important

Generate english versions of same content on Drupal?

My website needs to be able to support multiple languages for multiple countries. For example, the US might have English and Spanish, while the UK might only have English. If two countries use the same language, it DOES NOT mean the content is the same.
For this reason, I decided to use the internationalization module (i18n) and I created language codes as follows:
gb-en - UK English
us-en - US English
us-es - US Spanish
I set this up with no issues, but my problem comes in with creating all the default content. For each content type, I want to:
Set the content types default language as "English"
Create translated versions of each content type for each language
I know this will mean that the Spanish content would still be in English, but it's the first step towards translating it.
What is the easiest way to create all these "default" content pages?
You could create a module implementing hook_node_insert(). This module would intercept the creation of a new node (stored with the default language) and create as many copies as needed. Each of these copies should have a different value in the field language. These copies colud be easily stored in the dabase using node_save() function.

Titanium Mobile: set locale (language) in app

I don't quite get how the user locale is handled in Titanium Mobile.
I have now set up two language files, and at least the English version is working fine. Now I would like to be able to set the locale within the app, so a user may change the language of the app.
How is this done?
And what is the best way to handle other locale issues such as currency, date formatting, etc.?
Thanks you for your answers!
Cheers
Chris
Use and external JS library like https://github.com/fnando/i18n-js to be able to force switch language within app. The library is already quite robust.
http://i18njs.com/
For changing the language of the app you can try this, as I am using same for the same purpose :-
I have added this in alloy.js
var language = Ti.App.Properties.getString('selectedLanguage','es');
Alloy.Globals.language = language;
Ti.Locale.setLanguage(language);
for changing the app language, I have created a tableView for selection on table's click listener I am changing the app language
if(e.index == 0){
Alloy.Globals.language = 'es';
Ti.App.Properties.setString('selectedLanguage','es');
}else{
Alloy.Globals.language = 'en';
Ti.App.Properties.setString('selectedLanguage','en');
}
and after all that I am refreshing my screen, in my function updateScreenForLanguage();
function updateScreenForLanguage(){
$.Back.text = (L('Back'));
$.Title.text = (L('Profile'));
$.labelLanguagePreference.text = (L("Language_Preference"));
}
hope this will help you. for more Titanium internationalization
You can use below modules
https://marketplace.appcelerator.com/listing?q=locale%20-#!/list/page/1/search=locale%20-
This modules helps you to follow same i18n folder string.xml and it will force the language only inside your app.
Titanium language locale can be use like this
var language = Titanium.Platform.locale;
Titanium.App.Properties.setString('locale',language);
Titanium.App.language = language;

Resources