Why locale did not supported in project? - commercetools

I recently work with Commercetools platform and I have a question.
I'm trying to create cart with locale, but when I do this I've got error.
io.sphere.sdk.client.ErrorResponseException: detailMessage: The locale
'en_US' is not part of the languages supported in this project
And I have this exception with any other locale.
My Merchant Settings:

Thanks for the request. en-us is supported in Merchant Centre. You need to edit the languages (as per your picture) and add any languages you wish to maintain data for.
See Docs https://docs.commercetools.com/merchant-center/project-settings.html
Does that work for you?
Best Regards
Brian

Related

Which one should be used in React, l10n or i18n?

I have a webpage in React and I wanted to use l10n (localization) but only find information about i18n (internationalization), so I don't know if l10n exists for React or if I'm forced to use i18n.
l10n stands for localization and i18n stands for internationalization.
Localization is the process of guaranteeing your resources are focused on the requirements of one specific audience.
The use of it is about adapting your entire content so that it meets the norms and expectations of a specific location or market.
To know more about localization, have a look at this blog post.
The internationalization process covers the design and development. So basically it is the task of instrumentalization (adaption) of your software code to be ready to be localized (not only translated) for other languages, regions and cultures. Think about ltr or rtl, currencies, date formats, etc...
Usually an i18n framework is used to help with this tasks.
Since you're talking about React.js, you may have a look at this step by step guide for react-i18next.
To know more about internationalization, have a look at this blog post.
There is also globalization, for that have a look at this.
So tldr; There's a lot to think about when internationalizing a webpage.
More information can be found here:
What is Software Localization
Is your software ready for localization?
How to localize your website

KIWI TCMS: How to set up source language

The source language of framework is English.
After the installation, it seems like Crowdin integrated to KIWI, enables Russian language.
But I still need English. Disabling 'Translation mode' does not solve the issue.
How to turn on the source language?
The main language (aka server language) is controlled via the LANGUAGE_CODE setting, see https://kiwitcms.readthedocs.io/en/latest/installing_docker.html#customization for how to override those.
The Crowdin platform and the so called "Translation mode" makes it easier to update existing translations and/or add new languages by providing in-page editor, see https://kiwitcms.readthedocs.io/en/latest/contribution.html#translation, but has nothing to do with the language that is displayed to the user.
The language preference is actually taken from the browser settings and then falls back to the server language setting. If you want to disable this then remove LocaleMiddleware from your settings. See
https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#how-django-discovers-language-preference for more background.
Disclaimer: this answer has been provided to you by a Kiwi TCMS team member.

Salesforce's APEX language specification

I'd like to find out exact APEX language specification (with all that grammars, etc.) but I've spent half a day and ended with almost nothing.
I know that APEX is Java-based language, but compiling it's spec on my own from Java spec and exclusively APEX things will be a pain.
Is there any place where I can get APEX language specification?
For those not familiar with them - I'm looking for a such document http://docs.oracle.com/javase/specs/jls/se7/html/index.html for it.
Thanks in advance!
My understanding is that Salesforce haven't currently published such a document. Instead they want you to use the Tooling API to get the tokens etc...
See Grammar for creating an Apex parser
Depending on your scenario you might find the Apex Language Server a useful tool. It does the Apex parsing etc... behind the scenes for the current VSCode tooling.
Incidentally, the Salesforce StackExchange site linked above is a great place to ask Salesforce specific questions.
Actually, Salesforce does publish a detailed Apex developer guide.
The current 2017 document can be found here :
https://resources.docs.salesforce.com/208/latest/en-us/sfdc/pdf/salesforce_apex_language_reference.pdf
This document and it's location could be updated frequently, so you can also Google 'Apex Developer Guide' to get here :
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm
Once here, click the PDF button to generate/view the latest PDF, or use the available content options to view online.

how to add multiple languages to an English website

I am trying to add two additional languages to my website - Chinese, Japanese. User inputs could be in native language, in English or be mixed. E.g. search by product name. Likewise output can be all-English or be in mixed languages, depending on a user's preferences. I already have applicable translations so that is not a problem. It is a data intensive site. It uses web APIs to fetch JSON data objects, and uses angular and backbone, and jquery.
I will appreciate if you possibly refer me to some good books or pages that provide guidance for building multilingual sites. Are there any particular web standards that must be followed by websites and by browsers?
Googling yields a ton of links, but the discussion appears centered around specific packages such as wordpress, joomla, .net, drupal, etc. and appears more around automated translations. It still left me confused about the basics requirements of multilingual sites as I do not use any of these packages.
Thanks a lot.
ps: if you need to leave me a -1, np. But I would very much appreciate a comment as to why - so that it doesn't appear as if you just vented and offered me no opportunity for improvement.
Wells... when i need to build a bilingual website i just use a language selector menu and build the whole website in 2 languages (i think this way its more professional) cause usually translators doesnt 100% translate correctly and at the end you just get a bunch of stuff making no sense.
Maybe you could use Google Website Translator gadget for what you trying to do?? its paid service tho, you could use also the plugin for Wordpress http://wordpress.org/plugins/google-language-translator/
Or use the Google Ajax Language API https://code.google.com/p/jquery-translate/

Internationalization and Localization in CakePHP 2.1

I am building a dual language app in CakePHP 2.1.x because of the great reviews of Cake's "built-in" localization features. However, I am wrestling with getting this powerful feature to work.
I know that this topic has been tackled for previous versions of Cake (here, here, here, and here), but it hasn't been solved for Cake 2.x. I am also referencing these articles in the cookbook (yes, I've read the manual):
http://book.cakephp.org/2.0/en/core-libraries/internationalization-and-localization.html
http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html
Couple of things -- I do not want to do separate subdomains for each language. Instead, I prefer URL based language switching with the click of a button (in this case, a flag icon). The site will be actively maintained, so the content needs to update dynamically. Asking the client to maintain two separate sites/databases is out of the question.
I have Translate behavior set up for my PostModel, but I can't tell if it's working. I also initialized I18n by running I18n in the console, have confirmed the database tables exist, have set up my .po files, and have wrapped all my content in __(). However, when I change the default language in my browser to French, the site remains in English.
I've tried the P28n Component, but I think it's outdated for Cake 2.x. I also tried URL-based language switching based on this nuts-and-bolts-of-cakephp article, but apparently it's incompatible with the new CakePHP API.
Can anyone point me in the direction of a tutorial or instructions that work with CakePHP 2.x? One not already referenced here?
Update: I found this article: http://www.localizingjapan.com/blog/2011/11/10/localizing-a-cakephp-application/comment-page-1/#comment-7467. Does anyone know where you place the code for CakeSession::write('Config.language', 'fre'); and setlocale("LC_ALL", "fr_FR.utf8");?
Simply put the code in AppController::beforeFilter() and set the values based on however you retrieve the language, from a post request or a part of the URL.

Resources