Menu
  • HOME
  • TAGS

Best way to check if a character is a vowel in any written language in Javascript

javascript,regex,multilingual

is there an easy of checking for any and all vowels? is there a known list of possible vowels? Not if you want to be accurate. Have a look at the definition of a written vowel in Wikipedia: In writing systems based on the Latin alphabet, the letters A,...

SQL Server how to store multilingual data?

sql-server,unicode,multilingual,nvarchar

You must always declare N before inserting any values. INSERT INTO MYTABLE (Col1) VALUES (N'your text') ...

newline for Arabic or urdu string

c#,localization,multilingual,arabic,text-processing

You actually need a right to left embedding character (RLE) at the beginning of the line to show RTL and LTR words correctly. U+202A:   LEFT-TO-RIGHT EMBEDDING (LRE) U+202B:   RIGHT-TO-LEFT EMBEDDING (RLE) U+202D:   LEFT-TO-RIGHT OVERRIDE (LRO) U+202E:   RIGHT-TO-LEFT OVERRIDE (RLO) U+202C:   POP DIRECTIONAL FORMATTING (PDF) http://www.w3.org/International/questions/qa-bidi-controls...

Using translation on the fly for System Tray and QAction (QT)

c++,qt,qt4,multilingual

I've corrected the issue by replacing each text based on the application status when a language change is triggered. void _ChangeLanguage() { m_pOpenGuiAction->setText(Helper::getTextOpenGui(trayStatus)); ...... } The ui->retranslateUi(this) is only possible if the dialog is created via QTCreator (designer), then this method, it's automatically added in the ui_*.h file....

Storing multi-language data in JSON (MySQL)

mysql,json,database,multilingual

Of course there's a downside : you can't do easy requests, for example to get the elements which don't have a translation in French. The point of relational databases is to structure data. Don't depart from that logic if you don't have important reasons. In that precise case, as you...

SEO and user-friendly URLs for multi-language website

url,seo,multilingual,usability

It's better to use the second one for better SEO results. example.com/en/link example.com/ru/ссылка Google likes the tree-like structure. Of course you can use the main language without prefix. Also it's better to have all languages in one domain: domain.com/en domain.com/ru not on subdomains like this en.domain.com ru.domain.com Wish you luck....

CSS issue when redirecting user deppending on browser's language

php,html,css,multilingual

The index file is now inside /en or /es, therefore: <link href="css/styles.css" type="text/css" rel="stylesheet"> should be: <link href="../css/styles.css" type="text/css" rel="stylesheet"> note the added ../ to go back a folder. Same goes for the js and other resources you have. I would recommend using absolute paths, that way you will not...

ResourceLoader doesn't load the right language

c#,localization,windows-phone-8.1,multilingual,win-universal-app

This is still a pain. I contacted MAT team and they said are working on it, releasing a sample of how to use v4 as soon as possible. As of now, the better solution I could find is to use v3.1, shared Resources.resw file and individual .xlf translations, but with...

Change language in WordPress using custom Code

php,wordpress,multilingual

I solved it using condition before the switch statment.It works define('WP_USE_THEMES', true); require("../app/Mage.php"); umask(0); Mage::app('default'); $currentUrl = Mage::helper('core/url')->getCurrentUrl(); $store_code = Mage::app()->getStore()->getCode(); if(Mage::getSingleton('core/session', array('name' => 'frontend'))->getData("foo") !='bar') { Mage::getSingleton('core/session')->setData("foo","bar"); switch ($store_code) { case 'french': $_baseurl = $currentUrl."?lang=fr"; echo "<script...

Custom :language cakephp

cakephp,multilingual,cakephp-2.3

You need to use the standard code for the language, the Belgian language does not exist (there are three official languages, Dutch, French, German). But if you have localized content for a particular country, then you should use the country code. There are countries that have more than one official...

Drupal7 View Multilingual issue

drupal,drupal-7,views,multilingual

Try writing an update script that saves your view that's in code into the database with $view->save(); When you update the view, you will always need an update script that updates the view in the database: $view->delete(); ctools_include('object-cache'); ctools_object_cache_clear('view', $view->name); $view->save(); ...

Translate Custom links on menu with mqtranslate plus on wordpress

php,wordpress,multilingual,qtranslate

Tried to find out if there's a filter called on the process while saving the URL field on the menu, and it seems like WordPress is doing this on it self without leaving the possibility to un-filter that. So having that on mind I came with a solution by using...

Best approach to multi-language app with a lot of language-specific resources?

android,multilingual

Create one library project, the logic project. Then, create a project by each language with have the library project. Other form is use any VCS, as GIT, and create a brach for each language. EDIT: Library projects: If the logic is the library project, you can create the apks directly...

how to rewrite url in .htaccess for a multilingual website

php,mod-rewrite,url-rewriting,multilingual

RewriteRule ^([^/]+)/([^/]+)$ $2?locale=$1 [QSA,L] RewriteRule ^([^/]+)/([^/]+)/([^/]+) $2?page=$3&locale=$1 [QSA,L] ...

“Page not found” all over the place with i18n on Drupal?

drupal-7,internationalization,multilingual

The i18n module does not work if you set the prefix as A/B, only as A. In other words, you can have this: /us-en But not this /us/en Which is really annoying and I wish it didn't work this way, or that someone at least added validation so you can...

Generate english versions of same content on Drupal?

drupal-7,internationalization,multilingual

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...

1 application on multiple domains (multilingual website)

php,.htaccess,multilingual

you have to point all your domains to the same folder in your server. and in your index.php or any very first php controller of your application, or in your setting.php where you have to know what domain is in use you do something like this: $currentDomain = $_SERVER['HTTP_HOST']; switch...

Direct link to language in OpenCart

opencart,multilingual

Nowadays opencart doesn't support this function, but in the past , older versions of Opencart did have this function. If you want to include this function in your website you will have to do the following: Edit this file: catalog/controller/module/language.php find this: class ControllerModuleLanguage extends Controller { protected function index()...

Translate joomla K2 template sentence

joomla,translation,joomla3.0,multilingual,k2

You can either edit the appropriate files in /language/overrides or use the Language override feature in your administrator backend (Administrator-Extensions-Language management-Overrides). There you can search for text, find the language constants, and provide your custom localisations, which will persist across components' and Joomla! updates....

multilingual database schema for mvc dot.net model

asp.net-mvc,database,multilingual

It depends on your requirements, but you can just create a class to load and cache the captions in memory, loading them using EF. Either use a static class or preferably the ASP.NET cache. If you are doing dynamic stuff on the client side then expose the strings through a...

Django CMS multilingual and international supports based on country or region

python,django-models,translation,multilingual,django-cms

I may be biased, but I think you should use django CMS. It supports multi-site (I think you require this?), full i18n and it even offers plugins for country-based segmentation on top of all the internationalisation. (So, you could make country-based offers, regardless of the language used on the request)....

Multilingual Android app using spinner

android,multilingual

From what I can gather in your code, you have issue with storing and restoring language. Following two methods will help you do that. After you load language, you can initialize spinner (or any other view). public void saveLanguage(String language) { SharedPreferences pref = getApplicationContext() .getSharedPreferences("MyPref", Context.MODE_PRIVATE); SharedPreferences.Editor editor =...

PyroCMS - Storing stream data in multiple languages

multilingual,pyrocms

You must create a field for save the language, for example (lang) and select the Pyro Lang FieldType Next, you can looping your stream making a where with the new field as column, for example: where lang = 'es' You can too use the Lang plugin for know the current...

C# Multilingual Application Menu Strip Item

c#,winforms,multilingual,contextmenustrip

Your ApplyResources is only applied to the dropDownItem and not the main item. foreach (ToolStripItem item in metroContextMenu1.Items) { if (item is ToolStripDropDownItem) foreach (ToolStripItem dropDownItem in ((ToolStripDropDownItem)item).DropDownItems) { resources.ApplyResources(dropDownItem, dropDownItem.Name, new CultureInfo(lang)); } //Also apply resources to main toolstrip items. resources.ApplyResources(item, item.Name, new CultureInfo(lang)); } ...

How to build a multilingual website with Polymer?

html,polymer,multilingual,web-component

you could do something like the chrome.i18n api for chrome apps and extensions. https://developer.chrome.com/extensions/i18n the general idea is each language has a json file with all the text. sub foldered by language. _locals \- en | \- messages.json - es \- messages.json content of the json file just needs to...

HTTP status code 406 appropriate for “Content not available in your country”? If not, what's appropriate?

http,http-status-code-404,multilingual,http-status-codes,http-status-code-406

You are using distinct URLs for each language, so a 404 would be the appropriate status code to use in this instance. If the different language resources were all available at the same URL and you used the Accept-language request header to determine which one to send, and the client...

How to docstring in python for multiple languages

python,internationalization,multilingual,docstring

There is no way to make docstring translated to multiple languages but you can create documentation via sphinx and translate the docs. Sphinx itself supports gettext-based translations for generated docs, take a look on Sphinx Internationalization Guide. ...

Android Studio: Error getting string from resource in multi-language app

android,multilingual,android-resources

The locale for Swedish is "sv_SE". Your Swedish resources need to go into values-sv, not values-se. "sv" is the language (in this case Swedish) "SE" is the country (in this case Sweden)...

Python Text to Speech on Mac Pronouncing Danish Words Wrong

python,osx,multilingual,speech-synthesis

You need to pass in a unicode object, not a UTF-8 bytestring: ve.startSpeakingString_(line.decode('utf8')) You could define the line value as a Unicode literal instead of decoding: line = u"på så må få på" ...

Multilingual Dictionary Solution C++ [closed]

c++,ios,multilingual,language-translation

Here is how I solved this. I downloaded word lists for all of the supported languages. I checked the word list of the language of the given input word and if the input word existed in this list, I used the bing translate API to get the definition of the...

Is there an easy way to get the implied xml:lang value for an element?

xml,xpath,multilingual

Yes! The XPath just below can be used to find the correct value of an xml:lang attribute from the context of a given element. ancestor-or-self::*[attribute::xml:lang][1]/@xml:lang The decribed pieces at each stage are underlined using carets, and broken down this: Follows the tree back to the root, through all ancestors, and...

AngularJS multilanguage URL routing with links

angularjs,multilingual

I finally followed my approach depicted above. Using UI-Router probably is best approach, but the change had a medium/big impact on my development.

Yii 2 MULTILINGUAL WEBSITE

widget,multilingual,yii2

So after lots of trial i found solution to my problem. Please refer below for those who wish to build multilingual widget in yii2 <?php namespace app\components\widgets; use Yii; use yii\helpers\Html; use yii\base\Widget; use app\components\views; class LanguageSelectorPortlet extends Widget { public function init(){ $this->renderContent(); } public function renderContent() { $currentLang...

Multilingual links in Blade Laravel

laravel,multilingual,blade

You could use the URL as a parameter and you would only need one translation entry: app/lang/en/contact.php return [ '1' => 'text before link <a href=":url">link text</a>text after link' ]; app/views/contact.blade.php <p>{{ Lang::get('contact.1', URL::route('home')) }}</p> Downside: you have HTML in your translations An other way to make your code cleaner...

Format date (with different input) php

php,date,format,multilingual,jquery-validation-engine

I know that Zend has some of this logic in there zend_date (requires Zend Framework ^^), but I would just use a simple solution like this: (where you get the format from a switch statement) $date = $_POST['date']; $toConvert = DateTime::createFromFormat('d-m-Y', $date); switch($lang){ case 'de': $format = 'Y-m-d'; break; default:...

Change resource file reference on btn click

c#,asp.net,multilingual,resx

Just like @Umriyaev suggested you have to override the InitializeCulture()and use that to pull the culture after another redirection. See here http://stackoverflow.com/a/10672476/2596756

How to make my CMS multilingual

php,mysql,database,multilingual

Basically you add a lang-key to your database urlname | name | id | content | position | hidden | redirect | type | permission | lang Now lets say a request comes for a page with 5 content elements in it. Your CMS first search for the entries with...

Laravel localization, redirect to the right view

php,laravel,localization,multilingual

Disclaimer: I have never used the package... That's because the package (and also the localization of laravel) assume that you are using Laravel's translations. So the package basically only worries about setting the application locale right and Laravel does the rest of the job. However if you need different views...