Most popular arabic culture for website localization - localization

I have created a website and I would like to provide locale support with arabic culture. When I see the locale strings there are many culture codes for arabic. Which one is best to use in my website for arabic language?
ar-DZ Arabic - Algeria
ar-BH Arabic - Bahrain
ar-EG Arabic - Egypt
ar-IQ Arabic - Iraq
ar-JO Arabic - Jordan
ar-KW Arabic - Kuwait
ar-LB Arabic - Lebanon
ar-LY Arabic - Libya
ar-MA Arabic - Morocco
ar-OM Arabic - Oman
ar-QA Arabic - Qatar
ar-SA Arabic - Saudi
ar-SY Arabic - Syria
ar-TN Arabic - Tunisia
ar-AE Arabic - United Arab Emirates
ar-YE Arabic - Yemen

The best thing is not to specify a particular country and use just ar (if allowed by your localization framework).

Related

show text in Arabic in RTF template

I have RTF Template and I need to show words of total amount in Arabic
for example :
Total Amount : 136,369.58
English Format : ONE HUNDRED THIRTY-SIX THOUSAND THREE HUNDRED SIXTY-NINE AND FIFTY-EIGHT
Arabic Format : مائة وستة وثلاثون ألفًا وثلاثمائة وتسعة وستون ريال وثمانية وخمسون هلله
I used xdoxslt:toCheckNumber($_XDOLOCALE, sum(COLUMN_NAME), ‘EUR’, ‘CASE_UPPER’, ‘DECIMAL_STYLE_WORDS’) to get English Format and it worked fine for English but does not work for Arabic.
I tried many google links to get Arabic Format but I got nothing.
This working fine , I guess. Good Luck
Remove the space between the first < and ?
< ?xdoxslt:toCheckNumber('AR-SAR', FINAL_AMOUNT, 2)?>

Changing University name, thesis title e.a. for abstract in different language

I need to write two different abstracts in my thesis in german and in english. The German one works fine and by using the \begin{otherlanguage} command, the abstract name itself changes to english. But furthermore I need to use an english tilte, university name, faculty name and company name for the second abstract. I tried using \renewcommand but it does not change the title in the output file, which is still german.
I found packages for multiple titles (\titling), but that is not working for the university name and so on.
Thank you in advance
\documentclass[11pt, english, ngerman,]{MastersDoctoralThesis}
\thesistitle{Title in German}
\university{University Title in German}
\begin{document}
\begin{abstract}
\addchaptertocentry{\abstractname}
German German German
\end{abstract}
\begin{otherlanguage}{english}
\renewcommand{\thesistitle}{Title in English}
\renewcommand{\university}{University Title in English}
\begin{abstract}
English English English
\end{abstract}
\end{otherlanguage}
% This template was downloaded from:
% http://www.LaTeXTemplates.com
% Template license:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
\documentclass[11pt, english, ngerman,openany]{MastersDoctoralThesis}
\usepackage{blindtext}
\thesistitle{Wombat} % Your thesis title, this is used in the title and abstract, print it elsewhere with \ttitle
\supervisor{Gerald Giraffe} % Your supervisor's name, this is used in the title page, print it elsewhere with \supname
\examiner{} % Your examiner's name, this is not currently used anywhere in the template, print it elsewhere with \examname
\degree{Doctor of Philosophy} % Your degree name, this is used in the title page and abstract, print it elsewhere with \degreename
\author{John \textsc{Smith}} % Your name, this is used in the title page and abstract, print it elsewhere with \authorname
\addresses{} % Your address, this is not currently used anywhere in the template, print it elsewhere with \addressname
\subject{Biological Sciences} % Your subject area, this is not currently used anywhere in the template, print it elsewhere with \subjectname
\keywords{} % Keywords for your thesis, this is not currently used anywhere in the template, print it elsewhere with \keywordnames
\university{Uni der Zootiere} % Your university's name and URL, this is used in the title page and abstract, print it elsewhere with \univname
\department{Institut der Angewandten Tierpflegeranalyse} % Your department's name and URL, this is used in the title page and abstract, print it elsewhere with \deptname
\group{\href{http://researchgroup.university.com}{Research Group Name}} % Your research group's name and URL, this is used in the title page, print it elsewhere with \groupname
\faculty{\href{http://faculty.university.com}{Faculty Name}} % Your faculty's name and URL, this is used in the title page and abstract, print it elsewhere with \facname
\begin{document}
\begin{abstract}
\addchaptertocentry{\abstractname}
\blindtext
\end{abstract}
\begin{otherlanguage}{english}
\makeatletter
\renewcommand{\#title}{Capybara}
\makeatother
\renewcommand{\univname}{Univerity of Zoo Animals}
\renewcommand{\deptname}{Institute for applied Something}
\begin{abstract}
\blindtext
\end{abstract}
\end{otherlanguage}
\end{document}
I do not have, neither know the package MastersDoctoralThesis.
If it includes the babel package, you can use iflang to test the active language.
\documentclass[11pt]{article}
\usepackage{iflang}
\usepackage[german]{babel}
%\usepackage[english]{babel}
\begin{document}
\IfLanguageName{german}{
German German German
}{
English English English
}
\end{document}
If your document class does not include the babel language, you can do something similar by defining a macro and testing its value with the ifthen package.
\documentclass[11pt]{article}
\usepackage{ifthen}
\def\mylanguage{german}
\begin{document}
\ifthenelse{\equal{\mylanguage}{german}}{
German German German
}{
English English English
}
\end{document}

Auto translation with GOOGLETRANSLATE is not working

The issue is simple, when I try to do auto translate from English to a detected language I got an error, the formula is:
=GOOGLETRANSLATE("Cat"; "en"; "auto")
and the error is something like
Error, Google Translate does not support translation from en to pl-PL.
The problem (I think) is that GOOGLETRANSLATE is supposed to get language as two letter code when default value is language + country code (which is not supported https://support.google.com/docs/answer/3093331?hl=en)
Is it possible to fix that? I would like to translate to user's language (so I want to use "auto" value), no matter what is the language and I assume that if the problem occurs for one language it will happen for different one.
Have you tried to use ; instead of ,.
Example:
=GOOGLETRANSLATE(A1 ; "auto"; "bg")
I have the same issue for Russian. The formula =GOOGLETRANSLATE("Cat"; "en"; "auto") gives the error:
Google Translate does not support translating from en to ru-RU.
This is Google issue, the best way is to report it:
Menu: Help > Report a problem
Here's a workaround:
make a script to detect sheet's locale.
use regex to extract first part of a locale string.
Here's the sample code:
function getLocale()
{
var locale = SpreadsheetApp.getActive().getSpreadsheetLocale(); // pl_PL
return /(.*)_/.exec(locale)[1]; // pl
}
The usage:
=GOOGLETRANSLATE("Cat"; "en"; getLocale())
auto-translate is supported only for these 16 locales:
brazil
germany
mexico
spain
canada (english)
hong kong
philippines
taiwan
china
italy
portugal
united kingdom
france
japan
south korea
united states
see more at: https://stackoverflow.com/a/73767720/5632629

What numeral system should be used for hi (Hindi) locale?

Opinions seem to differ on what numeral system to use when localising software to Hindi:
Java
hi: Western Arabic
Locale hi = new Locale("hi")
System.out.format(hi, "%d", 123456)
-> 123456
hi_IN: Devanagari
Locale hi_IN = new Locale("hi", "IN")
System.out.format(hi_IN, "%d", 123456)
-> १२३४५६
JavaScript - nodejs
hi: Western Arabic
console.log(new Intl.NumberFormat('hi').format(123456.7890));
-> 1,23,456.789
hi-in: Western Arabic
console.log(new Intl.NumberFormat('hi-IN').format(123456.7890));
-> 1,23,456.789
JavaScript - Firefox
hi: Western Arabic
console.log(new Intl.NumberFormat('hi').format(123456.7890));
-> 1,23,456.789
hi-in: Western Arabic
console.log(new Intl.NumberFormat('hi-IN').format(123456.7890));
-> 1,23,456.789
moment.js
hi: Devanagari
https://github.com/moment/moment/blob/develop/locale/hi.js#L13-L36
So...
Which is correct? Or is there no definitive answer?

iOS arabic localization issue

I have a string which contains an arabic string. When device locale is in arabic, the string is displayed properly. But when device locale is in english, the string order is lost i.e it turns the string to rtl.
My localizable string is:
"%1$# has recharged your phone by %2$#."
When locale is in english the output is:
The output should have been:
برتيكشا has recharged your phone by 1500.
How do I do this?

Resources